node/test/fixtures/source-map/output/source_map_eval.js
Chengzhong Wu 7ffa029750
src,lib: obtain sourceURL in magic comments from V8
Obtain sourceURL magic comments via V8 API to avoid a second round of
extraction of magic comments.

Updates source map snapshot normalization to allow testing full path
names inside the test outputs.

PR-URL: https://github.com/nodejs/node/pull/58389
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-05-30 09:47:20 +00:00

11 lines
291 B
JavaScript

// Flags: --enable-source-maps
'use strict';
require('../../../common');
Error.stackTraceLimit = 3;
const fs = require('fs');
const content = fs.readFileSync(require.resolve('../tabs-source-url.js'), 'utf8');
// SourceURL magic comment is hardcoded in the source content.
eval(content);