Sha256: c12cc53554ad215d993fb172c449d508994eb76afc2e45df18b8f50af1bba827

Contents?: true

Size: 941 Bytes

Versions: 59

Compression:

Stored size: 941 Bytes

Contents

describe("j$.util", function() {
  describe("isArray_", function() {
    it("should return true if the argument is an array", function() {
      expect(j$.isArray_([])).toBe(true);
      expect(j$.isArray_(['a'])).toBe(true);
    });

    it("should return false if the argument is not an array", function() {
      expect(j$.isArray_(undefined)).toBe(false);
      expect(j$.isArray_({})).toBe(false);
      expect(j$.isArray_(function() {})).toBe(false);
      expect(j$.isArray_('foo')).toBe(false);
      expect(j$.isArray_(5)).toBe(false);
      expect(j$.isArray_(null)).toBe(false);
    });
  });

  describe("isUndefined", function() {
    it("reports if a variable is defined", function() {
      var a;
      expect(j$.util.isUndefined(a)).toBe(true);
      expect(j$.util.isUndefined(undefined)).toBe(true);

      var undefined = "diz be undefined yo";
      expect(j$.util.isUndefined(undefined)).toBe(false);
    });
  });
});

Version data entries

59 entries across 59 versions & 4 rubygems

Version Path
jasmine-core-2.3.2 ./lib/jasmine-core/spec/core/UtilSpec.js
upjs-rails-0.3.3 spec_app/vendor/assets/bower_components/jasmine/spec/core/UtilSpec.js
jasmine-core-2.3.0 ./lib/jasmine-core/spec/core/UtilSpec.js
upjs-rails-0.3.2 spec_app/vendor/assets/bower_components/jasmine/spec/core/UtilSpec.js
upjs-rails-0.3.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/UtilSpec.js
upjs-rails-0.2.2 spec_app/vendor/assets/bower_components/jasmine/spec/core/UtilSpec.js
upjs-rails-0.2.1 spec_app/vendor/assets/bower_components/jasmine/spec/core/UtilSpec.js
upjs-rails-0.2.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/UtilSpec.js
jasmine-core-2.2.0 ./lib/jasmine-core/spec/core/UtilSpec.js
jasmine-core-2.1.3 ./lib/jasmine-core/spec/core/UtilSpec.js
jasmine-core-2.1.2 ./lib/jasmine-core/spec/core/UtilSpec.js
jasmine-core-2.1.1 ./lib/jasmine-core/spec/core/UtilSpec.js
jasmine-core-2.1.0 ./lib/jasmine-core/spec/core/UtilSpec.js
jasmine-core-2.0.2 ./lib/jasmine-core/spec/core/UtilSpec.js
jasmine-core-2.0.1 ./lib/jasmine-core/spec/core/UtilSpec.js
jasmine-core-2.0.0 ./lib/jasmine-core/spec/core/UtilSpec.js
jasmine-core-2.0.0.rc5 ./lib/jasmine-core/spec/core/UtilSpec.js
jasmine-core-2.0.0.rc3 ./lib/jasmine-core/spec/core/UtilSpec.js
jasmine-core-2.0.0.rc2 ./lib/jasmine-core/spec/core/UtilSpec.js