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 — tools: enable linter in `test/fixtures/test-runner/output` · nodejs/node@bbbf498

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • eslint.config.mjs
  • test/fixtures/test-runner/output
    • abort_hooks.js
    • arbitrary-output-colored.js
    • arbitrary-output.js
    • assertion-color-tty.mjs
    • before-and-after-each-too-many-listeners.js
    • before-and-after-each-with-timeout-too-many-listeners.js
    • coverage-width-100-uncovered-lines.mjs
    • coverage-width-100-uncovered-lines.snapshot
    • coverage-width-100.mjs
    • coverage-width-100.snapshot
    • coverage-width-150-uncovered-lines.mjs
    • coverage-width-150-uncovered-lines.snapshot
    • coverage-width-150.mjs
    • coverage-width-150.snapshot
    • coverage-width-40.mjs
    • coverage-width-40.snapshot
    • coverage-width-80-color.mjs
    • coverage-width-80-uncovered-lines-color.mjs
    • coverage-width-80-uncovered-lines.mjs
    • coverage-width-80-uncovered-lines.snapshot
    • coverage-width-80.mjs
    • coverage-width-80.snapshot
    • coverage-width-infinity-uncovered-lines.mjs
    • coverage-width-infinity-uncovered-lines.snapshot
    • coverage-width-infinity.mjs
    • coverage-width-infinity.snapshot
    • coverage_failure.js
    • describe_it.js
    • filtered-suite-order.mjs
    • filtered-suite-throws.js
    • global_after_should_fail_the_test.js
    • hooks-with-no-global-test.js
    • hooks.js
    • junit_reporter.js
    • lcov_reporter.js
    • lcov_reporter.snapshot
    • name_pattern.js
    • only_tests.js
    • output.js
    • output_cli.js
    • spec_reporter_cli.js
    • test-diagnostic-warning-without-test-only-flag.js
    • test-runner-plan-timeout.js
    • timeout_in_before_each_should_not_affect_further_tests.js

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎eslint.config.mjs‎

Copy file name to clipboardExpand all lines: eslint.config.mjs
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { readdirSync } from 'node:fs';
12
import Module from 'node:module';
23
import { fileURLToPath, URL } from 'node:url';
34

@@ -25,6 +26,12 @@ const { default: stylisticJs } = await importEslintTool('@stylistic/eslint-plugi
2526

2627
nodeCore.RULES_DIR = fileURLToPath(new URL('./tools/eslint-rules', import.meta.url));
2728

29+
function filterFilesInDir(dirpath, filterFn) {
30+
return readdirSync(dirpath)
31+
.filter(filterFn)
32+
.map((f) => `${dirpath}/${f}`);
33+
}
34+
2835
// The Module._resolveFilename() monkeypatching is to make it so that ESLint is able to
2936
// dynamically load extra modules that we install with it.
3037
const ModuleResolveFilename = Module._resolveFilename;
@@ -54,6 +61,14 @@ export default [
5461
'test/fixtures/*',
5562
'!test/fixtures/console',
5663
'!test/fixtures/eval',
64+
'!test/fixtures/test-runner',
65+
'test/fixtures/test-runner/*',
66+
'!test/fixtures/test-runner/output',
67+
...filterFilesInDir(
68+
'test/fixtures/test-runner/output',
69+
// Filtering tsc output files (i.e. if there a foo.ts, we ignore foo.js):
70+
(f, _, files) => f.endsWith('js') && files.includes(f.replace(/\.[cm]?js$/, '.ts')),
71+
),
5772
'!test/fixtures/v8',
5873
'!test/fixtures/vm',
5974
]),
Collapse file

‎test/fixtures/test-runner/output/abort_hooks.js‎

Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/abort_hooks.js
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ describe('1 before describe', () => {
55
const ac = new AbortController();
66
before(() => {
77
console.log('before');
8-
ac.abort()
9-
}, {signal: ac.signal});
8+
ac.abort();
9+
}, { signal: ac.signal });
1010

1111
it('test 1', () => {
1212
console.log('1.1');
@@ -20,8 +20,8 @@ describe('2 after describe', () => {
2020
const ac = new AbortController();
2121
after(() => {
2222
console.log('after');
23-
ac.abort()
24-
}, {signal: ac.signal});
23+
ac.abort();
24+
}, { signal: ac.signal });
2525

2626
it('test 1', () => {
2727
console.log('2.1');
@@ -35,8 +35,8 @@ describe('3 beforeEach describe', () => {
3535
const ac = new AbortController();
3636
beforeEach(() => {
3737
console.log('beforeEach');
38-
ac.abort()
39-
}, {signal: ac.signal});
38+
ac.abort();
39+
}, { signal: ac.signal });
4040

4141
it('test 1', () => {
4242
console.log('3.1');
@@ -50,8 +50,8 @@ describe('4 afterEach describe', () => {
5050
const ac = new AbortController();
5151
afterEach(() => {
5252
console.log('afterEach');
53-
ac.abort()
54-
}, {signal: ac.signal});
53+
ac.abort();
54+
}, { signal: ac.signal });
5555

5656
it('test 1', () => {
5757
console.log('4.1');
Collapse file

‎test/fixtures/test-runner/output/arbitrary-output-colored.js‎

Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/arbitrary-output-colored.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ const fixtures = require('../../../common/fixtures');
88
const test = fixtures.path('test-runner/output/arbitrary-output-colored-1.js');
99
const reset = fixtures.path('test-runner/output/reset-color-depth.js');
1010
await once(spawn(process.execPath, ['-r', reset, '--test', test], { stdio: 'inherit' }), 'exit');
11-
await once(spawn(process.execPath, ['-r', reset, '--test', '--test-reporter', 'tap', test], { stdio: 'inherit' }), 'exit');
11+
await once(
12+
spawn(process.execPath, ['-r', reset, '--test', '--test-reporter', 'tap', test], { stdio: 'inherit' }),
13+
'exit',
14+
);
1215
})().then(common.mustCall());
Collapse file

‎test/fixtures/test-runner/output/arbitrary-output.js‎

Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/arbitrary-output.js
+9-6Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@ const v8_reporter = require('internal/test_runner/reporter/v8-serializer');
55
const { Buffer } = require('buffer');
66

77

8-
(async function () {
8+
// eslint-disable-next-line node-core/async-iife-no-unused-result
9+
(async function() {
910
const reported = v8_reporter([
10-
{ type: "test:pass", data: { name: "test", nesting: 0, file: __filename, testNumber: 1, details: { duration_ms: 0 } } }
11+
{
12+
type: 'test:pass',
13+
data: { name: 'test', nesting: 0, file: __filename, testNumber: 1, details: { duration_ms: 0 } },
14+
},
1115
]);
1216

1317
for await (const chunk of reported) {
1418
process.stdout.write(chunk);
15-
process.stdout.write(Buffer.concat([Buffer.from("arbitrary - pre"), chunk]));
16-
process.stdout.write(Buffer.from("arbitrary - mid"));
17-
process.stdout.write(Buffer.concat([chunk, Buffer.from("arbitrary - post")]));
19+
process.stdout.write(Buffer.concat([Buffer.from('arbitrary - pre'), chunk]));
20+
process.stdout.write(Buffer.from('arbitrary - mid'));
21+
process.stdout.write(Buffer.concat([chunk, Buffer.from('arbitrary - post')]));
1822
}
1923
})();
20-
Collapse file

‎test/fixtures/test-runner/output/assertion-color-tty.mjs‎

Copy file name to clipboard
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import assert from 'node:assert/strict'
2-
import { test } from 'node:test'
1+
import assert from 'node:assert/strict';
2+
import { test } from 'node:test';
33

44
test('failing assertion', () => {
5-
assert.strictEqual('!Hello World', 'Hello World!')
6-
})
5+
assert.strictEqual('!Hello World', 'Hello World!');
6+
});
Collapse file

‎test/fixtures/test-runner/output/before-and-after-each-too-many-listeners.js‎

Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/before-and-after-each-too-many-listeners.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
const { beforeEach, afterEach, test} = require("node:test");
2+
const { beforeEach, afterEach, test } = require('node:test');
33
beforeEach(() => {});
44
afterEach(() => {});
55

Collapse file

‎test/fixtures/test-runner/output/before-and-after-each-with-timeout-too-many-listeners.js‎

Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/before-and-after-each-with-timeout-too-many-listeners.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
2-
const { beforeEach, afterEach, test} = require("node:test");
3-
beforeEach(() => {}, {timeout: 10000});
4-
afterEach(() => {}, {timeout: 10000});
2+
const { beforeEach, afterEach, test } = require('node:test');
3+
beforeEach(() => {}, { timeout: 10000 });
4+
afterEach(() => {}, { timeout: 10000 });
55

66
for (let i = 1; i <= 11; ++i) {
77
test(`${i}`, () => {});
Collapse file

‎test/fixtures/test-runner/output/coverage-width-100-uncovered-lines.mjs‎

Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/coverage-width-100-uncovered-lines.mjs
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
// Flags: --experimental-test-coverage
22
// here we can't import common module as the coverage will be different based on the system
33
// Unused imports are here in order to populate the coverage report
4+
// eslint-disable-next-line no-unused-vars
45
import * as a from '../coverage-snap/b.js';
6+
// eslint-disable-next-line no-unused-vars
57
import * as b from '../coverage-snap/a.js';
8+
// eslint-disable-next-line no-unused-vars
69
import * as c from '../coverage-snap/many-uncovered-lines.js';
710

811
import { test } from 'node:test';
Collapse file

‎test/fixtures/test-runner/output/coverage-width-100-uncovered-lines.snapshot‎

Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/coverage-width-100-uncovered-lines.snapshot
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ ok 1 - Coverage Print Fixed Width 100
2828
# output | | | |
2929
# coverage-width-100-uncovered-lines.mjs | 100.00 | 100.00 | 100.00 |
3030
# --------------------------------------------------------------------------------------------------
31-
# all files | 52.80 | 60.00 | 1.61 |
31+
# all files | 53.13 | 60.00 | 1.61 |
3232
# --------------------------------------------------------------------------------------------------
3333
# end of coverage report
Collapse file

‎test/fixtures/test-runner/output/coverage-width-100.mjs‎

Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/coverage-width-100.mjs
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Flags: --experimental-test-coverage
22
// here we can't import common module as the coverage will be different based on the system
33
// Unused imports are here in order to populate the coverage report
4+
// eslint-disable-next-line no-unused-vars
45
import * as a from '../coverage-snap/b.js';
6+
// eslint-disable-next-line no-unused-vars
57
import * as b from '../coverage-snap/a.js';
68

79
import { test } from 'node:test';

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.