Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/close-stalled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: github.repository == 'nodejs/citgm'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
- uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-close: 30
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
show-progress: false

- name: Use LTS Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: lts/*

Expand All @@ -38,4 +38,4 @@ jobs:
test-command: npm run tap -- --coverage-report=lcov
post-test-steps: |
- name: Coverage Report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
7 changes: 3 additions & 4 deletions .github/workflows/test-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,22 @@ jobs:
- ubuntu-latest
- windows-latest
node-version:
- 18.x
- 20.x
- 22.x
- 23.x
- 24.x

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: ${{ github.event.inputs.repository }}
ref: ${{ github.event.inputs.ref }}
show-progress: false

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@
"allow-incomplete-coverage": true
},
"engines": {
"node": "18.x || 20.x || 22.x || 23.x"
"node": "20.x || 22.x || 24.x"
}
}
25 changes: 7 additions & 18 deletions test/reporter/test-reporter-junit.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ test('reporter.junit(): passing', (t) => {
}

junitReporter(logger, passingInput);
t.equal(
output,
passingExpected,
'we should get expected output when all' + ' modules pass'
);
t.equal(output, passingExpected);
t.end();
});

Expand All @@ -94,11 +90,11 @@ test('reporter.junit(): bad output', (t) => {

t.doesNotThrow(() => {
junitReporter(logger, corruptXml);
}, 'parsing bad data should not throw');
});

t.doesNotThrow(() => {
junitReporter(logger, corruptXmlToo);
}, 'parsing bad data should not throw');
});

t.ok(output);
});
Expand All @@ -112,8 +108,7 @@ test('reporter.junit(): failing', (t) => {
}

junitReporter(logger, failingInput);
(t.equal(output, failingExpected),
'we should get the expected output when a' + ' module fails');
t.equal(output, failingExpected);
t.end();
});

Expand All @@ -127,19 +122,14 @@ test('reporter.junit(): parser', async (t) => {

junitReporter(logger, failingInput);
const result = await parseString(output);
t.same(
result,
junitParserExpected,
'we should get the expected output when a module fails'
);
t.same(result, junitParserExpected);
});

test('reporter.junit(): write to disk', (t) => {
t.plan(1);
junitReporter(outputFile, passingInput);
const expected = readFileSync(outputFile, 'utf8');
(t.equal(expected, passingExpected),
'the file on disk should match the' + ' expected output');
t.equal(expected, passingExpected);
t.end();
});

Expand All @@ -149,8 +139,7 @@ test('reporter.junit(): append to disk', (t) => {
writeFileSync(outputFileAppend, appendStartFile);
junitReporter(outputFileAppend, passingInput, true);
const expected = readFileSync(outputFileAppend, 'utf-8');
(t.equal(expected, passingExpectedAppend),
'the file on disk should match the' + ' expected output');
t.equal(expected, passingExpectedAppend);
t.end();
});

Expand Down
21 changes: 6 additions & 15 deletions test/reporter/test-reporter-tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ test('reporter.tap(): passing', (t) => {
}

tapReporter(logger, passingInput);
t.equal(
output,
passingExpected,
'we should get expected output when all' + ' modules pass'
);
t.equal(output, passingExpected);
t.end();
});

Expand All @@ -79,8 +75,7 @@ test('reporter.tap(): failing', (t) => {
}

tapReporter(logger, failingInput);
(t.equal(output, failingExpected),
'we should get the expected output when a' + ' module fails');
t.equal(output, failingExpected);
t.end();
});

Expand All @@ -96,8 +91,7 @@ test('reporter.tap(): parser', (t) => {
// `results` contains JS classes that are not considered same as the
// plain objects loaded from the JSON file.
const plainResults = JSON.parse(JSON.stringify(results));
(t.same(plainResults, tapParserExpected),
'the tap parser should correctly' + ' parse the tap file');
t.same(plainResults, tapParserExpected);
t.end();
});
str(output).pipe(p);
Expand All @@ -107,8 +101,7 @@ test('reporter.tap(): write to disk', (t) => {
t.plan(1);
tapReporter(outputFile, passingInput);
const expected = readFileSync(outputFile, 'utf8');
(t.equal(expected, passingExpected),
'the file on disk should match the' + ' expected output');
t.equal(expected, passingExpected);
t.end();
});

Expand All @@ -118,17 +111,15 @@ test('reporter.tap(): append to disk', (t) => {
writeFileSync(outputFileAppend, appendStartFile);
tapReporter(outputFileAppend, passingInput, true);
const expected = readFileSync(outputFileAppend, 'utf8');
(t.equal(expected, passingExpectedAppend),
'the file on disk should match the' + ' expected output');
t.equal(expected, passingExpectedAppend);
t.end();
});

test('reporter.tap(): append to disk when file does not exist', (t) => {
t.plan(1);
tapReporter(outputFileAppendBlank, passingInput, true);
const expected = readFileSync(outputFileAppendBlank, 'utf8');
(t.equal(expected, passingExpected),
'the file on disk should match the' + ' expected output');
t.equal(expected, passingExpected);
t.end();
});

Expand Down
Loading