File tree 3 files changed +53
-0
lines changed
3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
exports [` prettier-formatter-gitlab cli should create a code quality report file with prettier -l 1` ] = `
4
4
[
5
+ {
6
+ " check_name" : " prettier" ,
7
+ " description" : " Delete ⏎" ,
8
+ " fingerprint" : " 20c9ca526d0a43e3075a3e0f74135991" ,
9
+ " location" : {
10
+ " lines" : {
11
+ " begin" : 11 ,
12
+ " end" : 12 ,
13
+ },
14
+ " path" : " test/__stubs__/.gitlab-ci.yml" ,
15
+ },
16
+ " severity" : " minor" ,
17
+ " type" : " issue" ,
18
+ } ,
5
19
{
6
20
" check_name" : " prettier" ,
7
21
" description" : " Replace ·arg·· with arg" ,
@@ -82,6 +96,20 @@ exports[`prettier-formatter-gitlab cli should create a code quality report file
82
96
83
97
exports[` prettier - formatter - gitlab cli should create a code quality report file with prettier - c 1 ` ] = `
84
98
[
99
+ {
100
+ " check_name" : " prettier" ,
101
+ " description" : " Delete ⏎" ,
102
+ " fingerprint" : " 20c9ca526d0a43e3075a3e0f74135991" ,
103
+ " location" : {
104
+ " lines" : {
105
+ " begin" : 11 ,
106
+ " end" : 12 ,
107
+ },
108
+ " path" : " test/__stubs__/.gitlab-ci.yml" ,
109
+ },
110
+ " severity" : " minor" ,
111
+ " type" : " issue" ,
112
+ },
85
113
{
86
114
" check_name" : " prettier" ,
87
115
" description" : " Replace ·arg·· with arg" ,
Original file line number Diff line number Diff line change
1
+ .ref :
2
+ script :
3
+ - npm run lint
4
+
5
+ prettier :
6
+ script :
7
+ - !reference [.ref, script]
8
+ artifacts :
9
+ reports :
10
+ codequality : gl-codequality.json
11
+
Original file line number Diff line number Diff line change
1
+ import { describe , it , expect } from 'bun:test' ;
2
+ import { resolve , join } from 'node:path' ;
3
+ import { getOutputPath } from '../../src/utils/get-output-path.js' ;
4
+
5
+ describe ( 'The getPrettierFileInfos function' , ( ) => {
6
+ it ( 'should return the output path defined in a .gitlab-ci.yml file' , ( ) => {
7
+ process . env . CI_PROJECT_DIR = resolve ( join ( import . meta. dirname , '../__stubs__/' ) ) ;
8
+ process . env . CI_JOB_NAME = 'prettier' ;
9
+ console . log ( process . env . CI_PROJECT_DIR ) ;
10
+ expect ( getOutputPath ( ) ) . toBe (
11
+ resolve ( join ( import . meta. dirname , '../__stubs__/gl-codequality.json' ) ) ,
12
+ ) ;
13
+ } ) ;
14
+ } ) ;
You can’t perform that action at this time.
0 commit comments