GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: migrate message v8 tests from Python to JS · nodejs/node@982b576

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test
    • fixtures/v8
      • v8_warning.js
      • v8_warning.snapshot
    • parallel
      • test-node-output-v8-warning.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/message/v8_warning.js‎ ‎test/fixtures/v8/v8_warning.js‎test/message/v8_warning.js renamed to test/fixtures/v8/v8_warning.js

Copy file name to clipboardExpand all lines: test/fixtures/v8/v8_warning.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
require('../common');
3+
require('../../common');
44

55
function AsmModule() {
66
'use asm';
Collapse file

‎test/message/v8_warning.out‎ ‎test/fixtures/v8/v8_warning.snapshot‎test/message/v8_warning.out renamed to test/fixtures/v8/v8_warning.snapshot

Copy file name to clipboard
File renamed without changes.
Collapse file

‎test/parallel/test-node-output-v8-warning.mjs‎

Copy file name to clipboard
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import '../common/index.mjs';
2+
import * as fixtures from '../common/fixtures.mjs';
3+
import * as snapshot from '../common/assertSnapshot.js';
4+
import { describe, it } from 'node:test';
5+
6+
function replaceNodeVersion(str) {
7+
return str.replaceAll(process.version, '*');
8+
}
9+
10+
describe('v8 output', { concurrency: true }, () => {
11+
function normalize(str) {
12+
return str.replaceAll(snapshot.replaceWindowsPaths(process.cwd()), '')
13+
.replaceAll(/:\d+/g, ':*')
14+
.replaceAll('/', '*')
15+
.replaceAll('*test*', '*')
16+
.replaceAll('*fixtures*v8*', '*')
17+
.replaceAll('node --', '* --');
18+
}
19+
const common = snapshot
20+
.transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths, replaceNodeVersion);
21+
const defaultTransform = snapshot.transform(common, normalize);
22+
const tests = [
23+
{ name: 'v8/v8_warning.js' },
24+
];
25+
for (const { name } of tests) {
26+
it(name, async () => {
27+
await snapshot.spawnAndAssert(fixtures.path(name), defaultTransform);
28+
});
29+
}
30+
});

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.