File tree 5 files changed +602
-862
lines changed
src/tooling/piral-cli/src/common
5 files changed +602
-862
lines changed Original file line number Diff line number Diff line change 50
50
"ci:release" : " lerna publish $(yarn --silent ci:version) --yes --force-publish --message '[skip ci] publish %s'"
51
51
},
52
52
"devDependencies" : {
53
- "@jsenv/file-size-impact" : " 14.3.12" ,
54
- "@testing-library/react" : " ^14.1.0" ,
53
+ "@jsenv/file-size-impact" : " 14.3.18" ,
54
+ "@testing-library/dom" : " ^10" ,
55
+ "@testing-library/react" : " ^16" ,
55
56
"caniuse-lite" : " ^1.0.30001341" ,
56
57
"esbuild" : " ^0.24.0" ,
57
- "jsdom" : " ^20.0.0 " ,
58
+ "jsdom" : " ^26 " ,
58
59
"lerna" : " ^8" ,
59
- "prettier" : " ^2.1.1 " ,
60
- "sass" : " ^1.34.0 " ,
61
- "tslint" : " ^5.12.1 " ,
62
- "tslint-config-prettier" : " ^1.18.0 " ,
63
- "tslint-plugin-prettier" : " ^2.0.1 " ,
60
+ "prettier" : " ^3 " ,
61
+ "sass" : " ^1" ,
62
+ "tslint" : " ^5" ,
63
+ "tslint-config-prettier" : " ^1" ,
64
+ "tslint-plugin-prettier" : " ^2" ,
64
65
"typedoc" : " 0.25.2" ,
65
66
"typescript" : " ^5" ,
66
- "vitest" : " ^2 "
67
+ "vitest" : " ^3 "
67
68
},
68
69
"resolutions" : {
69
70
"cookie" : " 0.7.0" ,
Original file line number Diff line number Diff line change @@ -22,25 +22,19 @@ describe('Pack Module', () => {
22
22
it ( 'createPilePackage without package json' , async ( ) => {
23
23
json = null ;
24
24
expect . assertions ( 1 ) ;
25
- await expect ( createPiletPackage ( './' , '' , '' ) ) . rejects . toEqual (
26
- Error ( '[0020] No valid package.json could be found.' ) ,
27
- ) ;
25
+ await expect ( createPiletPackage ( './' , '' , '' ) ) . rejects . toThrow ( '[0020] No valid package.json could be found.' ) ;
28
26
} ) ;
29
27
30
28
it ( 'createPilePackage without package json name' , async ( ) => {
31
29
json = { } ;
32
30
expect . assertions ( 1 ) ;
33
- await expect ( createPiletPackage ( './' , '' , '' ) ) . rejects . toEqual (
34
- Error ( '[0021] Cannot pack the pilet - missing name.' ) ,
35
- ) ;
31
+ await expect ( createPiletPackage ( './' , '' , '' ) ) . rejects . toThrow ( '[0021] Cannot pack the pilet - missing name.' ) ;
36
32
} ) ;
37
33
38
34
it ( 'createPilePackage without package json version' , async ( ) => {
39
35
json = { name : 'Test' } ;
40
36
expect . assertions ( 1 ) ;
41
- await expect ( createPiletPackage ( './' , '' , '' ) ) . rejects . toEqual (
42
- Error ( '[0022] Cannot pack the pilet - missing version.' ) ,
43
- ) ;
37
+ await expect ( createPiletPackage ( './' , '' , '' ) ) . rejects . toThrow ( '[0022] Cannot pack the pilet - missing version.' ) ;
44
38
} ) ;
45
39
46
40
it ( 'createPilePackage source = target' , async ( ) => {
Original file line number Diff line number Diff line change @@ -135,18 +135,11 @@ describe('CLI package module', () => {
135
135
it (
136
136
'retrievePiletData error cases' ,
137
137
async ( ) => {
138
- await retrievePiletData ( 'foo' , '' ) . catch ( ( err ) =>
139
- expect ( err ) . toStrictEqual ( Error ( '[0012] No Piral instances have been provided.' ) ) ,
138
+ await expect ( retrievePiletData ( 'foo' , 'bar' ) ) . rejects . toThrow (
139
+ '[0010] The defined Piral instance ("bar") could not be found.' ,
140
140
) ;
141
-
142
- await retrievePiletData ( 'foo' , 'bar' ) . catch ( ( err ) =>
143
- expect ( err ) . toStrictEqual ( Error ( '[0010] The defined Piral instance ("bar") could not be found.' ) ) ,
144
- ) ;
145
-
146
- await retrievePiletData ( '/foo' , 'sample-piral' ) . catch ( ( err ) =>
147
- expect ( err ) . toStrictEqual (
148
- Error ( '[0075] Cannot find the "package.json". You need a valid package.json for your pilet.' ) ,
149
- ) ,
141
+ await expect ( retrievePiletData ( '/foo' , 'sample-piral' ) ) . rejects . toThrow (
142
+ '[0075] Cannot find the "package.json". You need a valid package.json for your pilet.' ,
150
143
) ;
151
144
} ,
152
145
testOptions ,
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ describe('Rules Module', () => {
12
12
const runException = ( ) => {
13
13
ruleSummary ( [ 'Error!' ] , [ ] ) ;
14
14
} ;
15
- expect ( runException ) . toThrow ( Error ( '[0080] Validation failed. Found 1 error(s).' ) ) ;
15
+ expect ( runException ) . toThrow ( '[0080] Validation failed. Found 1 error(s).' ) ;
16
16
17
17
let consoleSpy = vitest . spyOn ( process . stderr , 'write' ) ;
18
18
ruleSummary ( [ ] , [ ] ) ;
You can’t perform that action at this time.
0 commit comments