mirror of
https://github.com/nodejs/node.git
synced 2025-05-02 14:56:19 +00:00

ESLint 4.x has stricter linting than previous versions. We are currently using the legacy indentation rules in the test directory. This commit changes the indentation of files to comply with the stricter 4.x linting and enable stricter linting in the test directory. PR-URL: https://github.com/nodejs/node/pull/14431 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
22 lines
456 B
JavaScript
22 lines
456 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
assert.strictEqual(process.assert(1, 'error'), undefined);
|
|
assert.throws(() => {
|
|
process.assert(undefined, 'errorMessage');
|
|
}, common.expectsError({
|
|
code: 'ERR_ASSERTION',
|
|
type: Error,
|
|
message: 'errorMessage'
|
|
})
|
|
);
|
|
assert.throws(() => {
|
|
process.assert(false);
|
|
}, common.expectsError({
|
|
code: 'ERR_ASSERTION',
|
|
type: Error,
|
|
message: 'assertion error'
|
|
})
|
|
);
|