Lines Matching refs:assert

24 const assert = require('assert');
34 assert.ok(process.stdout.writable);
35 assert.ok(process.stderr.writable);
38 assert.strictEqual(typeof process.stdout.fd, 'number');
39 assert.strictEqual(typeof process.stderr.fd, 'number');
76 assert.throws(() => console.time(Symbol('test')),
78 assert.throws(() => console.timeEnd(Symbol('test')),
182 assert.deepStrictEqual(console._times.get('test'), time);
192 console.assert(false, '%s should', 'console.assert', 'not throw');
193 assert.strictEqual(errStrings[errStrings.length - 1],
194 'Assertion failed: console.assert should not throw\n');
196 console.assert(false);
197 assert.strictEqual(errStrings[errStrings.length - 1], 'Assertion failed\n');
199 console.assert(true, 'this should not throw');
201 console.assert(true);
203 assert.strictEqual(strings.length, process.stdout.writeTimes);
204 assert.strictEqual(errStrings.length, process.stderr.writeTimes);
216 assert.strictEqual(console._times.size, timesMapSize);
223 assert.strictEqual(strings.shift(), `${expected}\n`);
224 assert.strictEqual(errStrings.shift(), `${expected}\n`);
228 assert.strictEqual(strings.shift(), `${expected}\n`);
229 assert.strictEqual(errStrings.shift(), `${expected}\n`);
233 assert.strictEqual(strings.shift(), `${expected}\n`);
236 assert.strictEqual(strings.shift(),
239 assert.strictEqual(strings.shift(),
242 assert.ok(strings.shift().includes('foo: [Object]'));
243 assert.strictEqual(strings.shift().includes('baz'), false);
244 assert.strictEqual(strings.shift(), 'inspect inspect\n');
245 assert.ok(strings[0].includes('foo: { bar: { baz:'));
246 assert.ok(strings[0].includes('quux'));
247 assert.ok(strings.shift().includes('quux: true'));
249 assert.match(strings.shift().trim(), /^label: \d+(\.\d{1,3})?(ms|s)$/);
250 assert.match(strings.shift().trim(), /^__proto__: \d+(\.\d{1,3})?(ms|s)$/);
251 assert.match(strings.shift().trim(), /^constructor: \d+(\.\d{1,3})?(ms|s)$/);
252 assert.match(strings.shift().trim(), /^hasOwnProperty: \d+(\.\d{1,3})?(ms|s)$/);
255 assert.match(strings.shift().trim(), /^: \d+(\.\d{1,3})?(ms|s)$/);
256 assert.match(strings.shift().trim(),
258 assert.match(strings.shift().trim(),
260 assert.match(strings.shift().trim(), /^null: \d+(\.\d{1,3})?(ms|s)$/);
261 assert.match(strings.shift().trim(), /^default: \d+(\.\d{1,3})?(ms|s)$/);
262 assert.match(strings.shift().trim(), /^default: \d+(\.\d{1,3})?(ms|s)$/);
263 assert.match(strings.shift().trim(), /^NaN: \d+(\.\d{1,3})?(ms|s)$/);
265 assert.match(strings.shift().trim(), /^log1: \d+(\.\d{1,3})?(ms|s)$/);
266 assert.match(strings.shift().trim(), /^log1: \d+(\.\d{1,3})?(ms|s) test$/);
267 assert.match(strings.shift().trim(),
269 assert.match(strings.shift().trim(), /^log1: \d+(\.\d{1,3})?(ms|s)$/);
272 assert.strictEqual(strings.length, 0);
274 assert.strictEqual(errStrings.shift().split('\n').shift(),
284 assert.strictEqual(data.includes('noLabel'), true);