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>
11 lines
291 B
JavaScript
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);
|