How to use the chai.assert.isObject function in chai

To help you get started, we’ve selected a few chai examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github krakenjs / makara / test / resolver.js View on Github external
it('should require a file extension', function () {
            var error;
            try {
                res = resolver.create({ root: '' });
            } catch (err) {
                error = err;
            } finally {
                assert.isObject(error);
            }
        });
github SpoonX / wetland / test / unit / Hydrator.spec.ts View on Github external
it('should add a recipe', () => {
      let recipe = getHydrator().addRecipe(null, 'foo', getManager().getMapping(User), 'single');

      assert.deepEqual(recipe.primaryKey, { alias: 'foo.id', property: 'id' });
      assert.isNull(recipe.parent);
      assert.isFalse(recipe.hydrate);
      assert.equal(recipe.type, 'single');
      assert.isObject(recipe.columns);
      assert.isUndefined(recipe.property);
      assert.equal(recipe.alias, 'foo');
    });
  });
github apiaryio / gavel.js / test / unit / support / amanda-to-gavel-shared.js View on Github external
it('should be an object', () => {
        assert.isObject(item);
      });
github azuqua / jwt-redis-session / test / tests.js View on Github external
request({ method: "get", path: "/login" }, null, function(error, resp){
				assert.notOk(error, "Token creation did not return an error");
				assert.isObject(resp, "Response is an object");
				assert.property(resp, "token", "Response contains a token property");
				assert.isString(resp.token, "Token is a string");
				token = resp.token;
				server.removeRoute("/login", "get");
				done();
			});
github krakenjs / makara / test / bundle.js View on Github external
bundle.load(function (err, bundle) {
                assert.isObject(err);
                assert.equal(err.message, 'Content bundle not found: unknown');
                assert.isNotObject(bundle);
                next();
            });
        });
github mosaicdao / mosaic.js / test_integration / 01_sequential_setup / 08_activation.js View on Github external
const assertReceipt = (receipt) => {
  assert.isNotNull(receipt, 'Transaction Receipt is null');
  assert.isObject(receipt, 'Transaction Receipt is not an object');
  assert.isTrue(receipt.status, 'Transaction failed.');
  return receipt;
};
github goatslacker / alt / test / index.js View on Github external
'getting state'() {
    assert.isObject(myStore.getState()._dispatcher, 'the dispatcher is exposed internally')

    assert(lifecycleStore.getState().bootstrapped === false, 'bootstrap has not been called yet')
    assert(lifecycleStore.getState().snapshotted === false, 'takeSnapshot has not been called yet')
    assert(lifecycleStore.getState().serialized === false, 'takeSnapshot has not been called yet')
    assert(lifecycleStore.getState().rollback === false, 'rollback has not been called')
    assert(lifecycleStore.getState().init === true, 'init gets called when store initializes')
    assert(lifecycleStore.getState().deserialized === true, 'deserialize has not been called yet')
  },
github mosaicdao / mosaic.js / test_integration / 02_sequential_setup / 04_ost_prime_helper.js View on Github external
const assertReceipt = (receipt) => {
  assert.isNotNull(receipt, 'Transaction Receipt is null');
  assert.isObject(receipt, 'Transaction Receipt is not an object');
  assert.isTrue(receipt.status, 'Transaction failed.');
  return receipt;
};
github krakenjs / shortstop / test / api.js View on Github external
resolver.resolveFile(path.join(process.cwd(), 'fixtures', 'data.txt'), function (err, data) {
                assert.isObject(data);
                assert.strictEqual(data.foo, 'bar');
                assert.strictEqual(data.foobar, 'foo bar');
                assert.isString(data.file);
                assert.isFunction(data.method);
                assert(Buffer.isBuffer(data.buffer));
                assert.strictEqual(data.buffer.toString(), 'Hello, world!');
                next();
            });
        });