The snapshotted stack frames should hide node internal stack frames so that general node core development does not need updating the snapshot. For userland stack frames, they are highly fixture related and any fixture change should reflect in a change of the snapshot. Additionally, the line and column number are highly relevant to the correctness of the snapshot, these should not be redacted. A change in node core that affects userland stack frames should be alarming and be reflected in the snapshots. Features like test runner and source map support both should snapshot userland stack frames to ensure that userland code locations are computed correctly. PR-URL: https://github.com/nodejs/node/pull/61665 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
22 lines
685 B
JavaScript
22 lines
685 B
JavaScript
import * as common from '../common/index.mjs';
|
|
if (!process.config.variables.node_use_amaro) {
|
|
common.skip('Requires Amaro');
|
|
}
|
|
import * as fixtures from '../common/fixtures.mjs';
|
|
import * as snapshot from '../common/assertSnapshot.js';
|
|
import { describe, it } from 'node:test';
|
|
|
|
describe('eval output', { concurrency: true }, () => {
|
|
const tests = [
|
|
{ name: 'eval/eval_messages.js' },
|
|
{ name: 'eval/stdin_messages.js' },
|
|
{ name: 'eval/stdin_typescript.js' },
|
|
{ name: 'eval/eval_typescript.js' },
|
|
];
|
|
|
|
for (const { name } of tests) {
|
|
it(name, async () => {
|
|
await snapshot.spawnAndAssert(fixtures.path(name), snapshot.defaultTransform);
|
|
});
|
|
}
|
|
});
|