Skip to content

Commit b56c540

Browse files
committed
fixup!
1 parent 9cda439 commit b56c540

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

src/generators/api-links/__tests__/fixtures/mod.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
// A module may export one or more methods.
44

5-
function foo() {}
5+
function foo() {
6+
}
7+
68

79
module.exports = {
8-
foo,
10+
foo
911
};
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
import assert from 'node:assert/strict';
22
import { describe, it } from 'node:test';
33

4-
import {
5-
errorIssue,
6-
infoIssue,
7-
warnIssue,
8-
} from '../../__tests__/fixtures/issues.mjs';
4+
import * as issues from '../../__tests__/fixtures/issues.mjs';
95
import github from '../github.mjs';
106

117
describe('github', () => {
128
it('should write to stdout with the correct fn based on the issue level', t => {
139
t.mock.method(process.stdout, 'write');
1410

15-
github(infoIssue);
16-
github(warnIssue);
17-
github(errorIssue);
11+
Object.values(issues).forEach(github);
1812

1913
assert.equal(process.stdout.write.mock.callCount(), 3);
2014

@@ -23,9 +17,9 @@ describe('github', () => {
2317
);
2418

2519
assert.deepEqual(callsArgs, [
20+
'::error file=doc/api/test.md,line=1,endLine=1::This is a ERROR issue',
2621
'::notice file=doc/api/test.md,line=1,endLine=1::This is a INFO issue',
2722
'::warning file=doc/api/test.md,line=1,endLine=1::This is a WARN issue',
28-
'::error file=doc/api/test.md,line=1,endLine=1::This is a ERROR issue',
2923
]);
3024
});
3125
});

0 commit comments

Comments
 (0)