mirror of https://gitee.com/openkylin/nodejs.git
24 lines
555 B
JavaScript
24 lines
555 B
JavaScript
'use strict';
|
|
|
|
// Verify that asserting in the very first line produces the expected result.
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { path } = require('../common/fixtures');
|
|
|
|
assert.throws(
|
|
() => require(path('assert-first-line')),
|
|
{
|
|
name: 'AssertionError',
|
|
message: "The expression evaluated to a falsy value:\n\n ässört.ok('')\n"
|
|
}
|
|
);
|
|
|
|
assert.throws(
|
|
() => require(path('assert-long-line')),
|
|
{
|
|
name: 'AssertionError',
|
|
message: "The expression evaluated to a falsy value:\n\n assert.ok('')\n"
|
|
}
|
|
);
|