How to use the assert-plus.equal function in assert-plus

To help you get started, we’ve selected a few assert-plus 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 michaelwittig / node-i18n-iso-countries / test / iso-i18n-countries.js View on Github external
it("toAlpha2 SGP => SGP", function() {
      assert.equal(i18niso.toAlpha3("SGP"), "SGP");
    });
  });
github joyent / sdc-docker / test / integration / helpers.js View on Github external
function GzDockerEnv(t, state, opts) {
    assert.object(t, 't');
    assert.object(state, 'state');
    assert.object(opts, 'opts');
    assert.string(opts.account, 'opts.account');
    assert.equal(opts.account.split('_')[0], 'sdcdockertest',
        'All test suite accounts should be prefixed with "sdcdockertest_"');

    this.login = opts.account;
    this.log = state.log;
}
github michaelwittig / node-i18n-iso-countries / test / iso-i18n-countries.js View on Github external
it("toAlpha3 XX => undefined", function() {
      assert.equal(i18niso.toAlpha3("XX"), undefined);
    });
    it("toAlpha3 SG => SGP", function() {
github michaelwittig / node-i18n-iso-countries / test / iso-i18n-countries.js View on Github external
it("for de => Γερμανία", function () {
          assert.equal(i18niso.getName("de", lang), "Γερμανία");
        });
      });
github michaelwittig / node-i18n-iso-countries / test / iso-i18n-countries.js View on Github external
it("for ba => Bośnia i Hercegowina", function () {
          assert.equal(i18niso.getName("ba", lang), "Bośnia i Hercegowina");
        });
        it("for cn => Chiny", function () {
github splunk / splunk-aws-project-trumpet / cloudtrail-serverless / lambda_code / cloudtrail_logger / node_modules / jsprim / lib / jsprim.js View on Github external
function hasKey(obj, key)
{
	mod_assert.equal(typeof (key), 'string');
	return (Object.prototype.hasOwnProperty.call(obj, key));
}
github joyent / dragnet / lib / datasource-manta.js View on Github external
var filename, contents, pkginfo;
		filename = mod_path.normalize(mod_path.join(
		    __dirname, '..', 'package.json'));
		try {
			contents = mod_fs.readFileSync(filename);
			pkginfo = JSON.parse(contents);
		} catch (ex) {
			return (new VError(ex, 'failed to determine Dragnet ' +
			    'package version from "%s"'));
		}

		DRAGNET_VERSION = pkginfo['version'];
	}

	dsconfig = args.dsconfig;
	mod_assertplus.equal(dsconfig.ds_backend, 'manta');
	if (typeof (dsconfig.ds_backend_config.path) != 'string')
		return (new VError('expected datasource "path" ' +
		    'to be a string'));
	return (new DatasourceManta(args));
}
github joyent / moray / lib / pg.js View on Github external
function pgAssert(_pg) {
    assert.ok(_pg, 'pg client wrapper');
    assert.ok(_pg.client, 'pg handle');
    assert.ok(_pg.client.connection, 'pg connection');
    assert.ok(_pg.client.connection.stream, 'pg stream');
    assert.ok(_pg.client.connection.stream.readable, 'pg readable');
    assert.ok(!_pg.client.connection.stream.destroyed, 'pg not destroyed');
    assert.ok(_pg.client.connection.stream.writable, 'pg writable');
    assert.equal(false, _pg._moray_txn, 'finished transaction');

    return (_pg._moray_had_err === null);
}