mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
9cbef482df
PR-URL: https://github.com/nodejs/node/pull/54585 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
27 lines
716 B
JavaScript
27 lines
716 B
JavaScript
'use strict';
|
|
|
|
// Verify that asserting in the very first line produces the expected result.
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { test } = require('node:test');
|
|
const { path } = require('../common/fixtures');
|
|
|
|
test('Verify that asserting in the very first line produces the expected result', () => {
|
|
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"
|
|
}
|
|
);
|
|
});
|