11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ci// Verify that asserting in the very first line produces the expected result. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_cirequire('../common'); 61cb0ef41Sopenharmony_ciconst assert = require('assert'); 71cb0ef41Sopenharmony_ciconst { path } = require('../common/fixtures'); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ciassert.throws( 101cb0ef41Sopenharmony_ci () => require(path('assert-first-line')), 111cb0ef41Sopenharmony_ci { 121cb0ef41Sopenharmony_ci name: 'AssertionError', 131cb0ef41Sopenharmony_ci message: "The expression evaluated to a falsy value:\n\n ässört.ok('')\n" 141cb0ef41Sopenharmony_ci } 151cb0ef41Sopenharmony_ci); 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ciassert.throws( 181cb0ef41Sopenharmony_ci () => require(path('assert-long-line')), 191cb0ef41Sopenharmony_ci { 201cb0ef41Sopenharmony_ci name: 'AssertionError', 211cb0ef41Sopenharmony_ci message: "The expression evaluated to a falsy value:\n\n assert.ok('')\n" 221cb0ef41Sopenharmony_ci } 231cb0ef41Sopenharmony_ci); 24