Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("toAlpha2 SGP => SGP", function() {
assert.equal(i18niso.toAlpha3("SGP"), "SGP");
});
});
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;
}
it("toAlpha3 XX => undefined", function() {
assert.equal(i18niso.toAlpha3("XX"), undefined);
});
it("toAlpha3 SG => SGP", function() {
it("for de => Γερμανία", function () {
assert.equal(i18niso.getName("de", lang), "Γερμανία");
});
});
it("for ba => Bośnia i Hercegowina", function () {
assert.equal(i18niso.getName("ba", lang), "Bośnia i Hercegowina");
});
it("for cn => Chiny", function () {
function hasKey(obj, key)
{
mod_assert.equal(typeof (key), 'string');
return (Object.prototype.hasOwnProperty.call(obj, key));
}
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));
}
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);
}