File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
src/linter/reporters/__tests__ Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 11import assert from 'node:assert/strict' ;
22import { 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' ;
95import github from '../github.mjs' ;
106
117describe ( '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} ) ;
You can’t perform that action at this time.
0 commit comments