Lines Matching refs:assert
11 const assert = require('assert');
54 assert.throws(
57 assert.throws(() => { throw error; }, expectedError);
58 assert.strictEqual(`${error}`, 'TypeError [ERR_INVALID_URL]: Invalid URL');
59 assert.strictEqual(error.message, 'Invalid URL');
69 if (test.href) assert.strictEqual(url.href, test.href);
70 if (test.origin) assert.strictEqual(url.origin, test.origin);
71 if (test.protocol) assert.strictEqual(url.protocol, test.protocol);
72 if (test.username) assert.strictEqual(url.username, test.username);
73 if (test.password) assert.strictEqual(url.password, test.password);
74 if (test.hostname) assert.strictEqual(url.hostname, test.hostname);
75 if (test.host) assert.strictEqual(url.host, test.host);
76 if (test.port !== undefined) assert.strictEqual(url.port, test.port);
77 if (test.pathname) assert.strictEqual(url.pathname, test.pathname);
78 if (test.search) assert.strictEqual(url.search, test.search);
79 if (test.hash) assert.strictEqual(url.hash, test.hash);
82 assert.throws(() => {