How to use the chai.assert.isFunction 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 chirashijs / chirashi / test / styles / show.js View on Github external
it('should be a function', () => {
    assert.isFunction(show)
  })
github BrowserSync / browser-sync / test / specs / server / server.js View on Github external
it("should have the createServer method", function () {
        assert.isFunction(server.createServer);
    });
});
github jsdom / jsdom / test / api / options-run-scripts.js View on Github external
it("should generate the body and Window property", () => {
          const dom = createJSDOM();
          dom.window.document.body.setAttribute("onhashchange", "document.body.onhashchangeRan = true;");

          assert.isFunction(dom.window.document.body.onhashchange);
          assert.isFunction(dom.window.onhashchange);
          assert.strictEqual(dom.window.document.body.onhashchange, dom.window.onhashchange);
        });
github KyleRoss / windows-cpu / test / cpu.js View on Github external
it('should be a function', () => {
                assert.isFunction(cpu.thisLoad);
            });
github chirashijs / chirashi / test / styles / getWidth.js View on Github external
it('should be a function', () => {
    assert.isFunction(getWidth)
  })
github Financial-Times / origami-build-service / test / unit / lib / middleware / cleanModulesParameter.js View on Github external
it('exports a function', () => {
		assert.isFunction(cleanModulesParameter);
	});
github prebid / Prebid.js / test / spec / api_spec.js View on Github external
it('should have function $$PREBID_GLOBAL$$.getAllWinningBids', function () {
      assert.isFunction($$PREBID_GLOBAL$$.getAllWinningBids);
    });
  });
github AugurProject / augur.js / test / unit / reporting / reporting.js View on Github external
collectFees: function (p) {
      assert.deepEqual(p.branch, '0xb1');
      assert.deepEqual(p.sender, '0x1');
      assert.deepEqual(p.periodLength, 1000);
      assert.isFunction(p.onSent);
      assert.isFunction(p.onSuccess);
      assert.isFunction(p.onFailed);

      p.onSent('1');
      p.onSuccess('1');
    }
  });
github ChuckJonas / ts-force / test / restObject.spec.ts View on Github external
acc.contacts.forEach(contact => {
      assert.isFunction(contact.update, 'Child Objects Should have DML functions!');
      assert.isFunction(contact.insert, 'Child Objects Should have DML functions!');
      assert.isFunction(contact.delete, 'Child Objects Should have DML functions!');
    });
  }
github data-forge / data-forge-js / src / dataframe.js View on Github external
DataFrame.prototype.aggregate = function (seedOrSelector, selector) {

	var self = this;

	if (Object.isFunction(seedOrSelector) && !selector) {
		return self.skip(1).aggregate(self.first(), seedOrSelector);
	}
	else if (selector) {
		assert.isFunction(selector, "Expected 'selector' parameter to aggregate to be a function.");

		var working = seedOrSelector;
		var it = self.iterable.getIterator();
		while (it.moveNext()) {
			var curValue = it.getCurrent()[1];
			working = selector(working, curValue);
		}

		return working;		
	}
	else {
		assert.isObject(seedOrSelector, "Expected 'seed' parameter to aggregate to be an object.");

		return E.from(Object.keys(seedOrSelector))
			.select(function (columnName) {
				var columnSelector = seedOrSelector[columnName];