File tree Expand file tree Collapse file tree 15 files changed +49
-91
lines changed Expand file tree Collapse file tree 15 files changed +49
-91
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ node_modules
3
3
.vscode
4
4
** /.DS_Store
5
5
.idea
6
+ package-lock.json
Original file line number Diff line number Diff line change 5
5
" streetsidesoftware.code-spell-checker" ,
6
6
" eamodio.gitlens" ,
7
7
" ritwickdey.LiveServer" ,
8
- " vsliveshare.vsliveshare"
8
+ " vsliveshare.vsliveshare" ,
9
+ " Orta.vscode-jest"
9
10
]
10
11
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 4
4
"license" : " CC-BY-SA-4.0" ,
5
5
"description" : " You must update this package" ,
6
6
"scripts" : {
7
- "test" : " jest"
7
+ "test" : " jest --config=../jest.config.js alarmclock "
8
8
},
9
9
"repository" : {
10
10
"type" : " git" ,
13
13
"bugs" : {
14
14
"url" : " https://github.com/CodeYourFuture/CYF-Coursework-Template/issues"
15
15
},
16
- "homepage" : " https://github.com/CodeYourFuture/CYF-Coursework-Template#readme" ,
17
- "devDependencies" : {
18
- "@testing-library/dom" : " ^8.19.0" ,
19
- "@testing-library/jest-dom" : " ^5.16.5" ,
20
- "@testing-library/user-event" : " ^13.5.0" ,
21
- "jest" : " ^29.2.2" ,
22
- "jest-environment-jsdom" : " ^29.2.2"
23
- },
24
- "jest" : {
25
- "setupFilesAfterEnv" : [
26
- " ./jest.setup.js"
27
- ]
28
- }
16
+ "homepage" : " https://github.com/CodeYourFuture/CYF-Coursework-Template#readme"
29
17
}
Original file line number Diff line number Diff line change
1
+ const { workspaces } = require ( "./package.json" ) ;
2
+
3
+ /** @type {import('jest').Config } */
4
+ const config = {
5
+ projects : workspaces . map ( ( displayName ) => ( {
6
+ displayName,
7
+ setupFilesAfterEnv : [
8
+ "<rootDir>/jest.setup.js" ,
9
+ ] ,
10
+ testEnvironment : "jsdom" ,
11
+ testMatch : [
12
+ `<rootDir>/${ displayName } /*.test.js` ,
13
+ ] ,
14
+ } ) ) ,
15
+ verbose : true ,
16
+ } ;
17
+
18
+ module . exports = config ;
Original file line number Diff line number Diff line change
1
+ const { TextDecoder, TextEncoder } = require ( "node:util" ) ;
2
+
3
+ require ( "@testing-library/jest-dom" ) ;
4
+
5
+ global . TextDecoder = TextDecoder ;
6
+ global . TextEncoder = TextEncoder ;
Original file line number Diff line number Diff line change 4
4
"license" : " CC-BY-SA-4.0" ,
5
5
"description" : " " ,
6
6
"scripts" : {
7
- "test" : " jest --testMatch='**/*.js' " ,
7
+ "test" : " jest" ,
8
8
"format" : " prettier --write ."
9
9
},
10
- "jest" : {
11
- "testPathIgnorePatterns" : [
12
- " alarmclock" ,
13
- " highlight-words" ,
14
- " slideshow" ,
15
- " reading-list" ,
16
- " todo-list" ,
17
- " quote-generator"
18
- ]
19
- },
20
10
"workspaces" : [
21
11
" alarmclock" ,
12
+ " quote-generator" ,
22
13
" reading-list" ,
23
- " highlight-words" ,
24
- " todo-list" ,
25
- " slideshow"
14
+ " slideshow" ,
15
+ " todo-list"
26
16
],
27
17
"repository" : {
28
18
"type" : " git" ,
31
21
"bugs" : {
32
22
"url" : " https://github.com/CodeYourFuture/Module-Data-Groups/issues"
33
23
},
34
- "homepage" : " https://github.com/CodeYourFuture/Module-Data-Groups#readme"
24
+ "homepage" : " https://github.com/CodeYourFuture/Module-Data-Groups#readme" ,
25
+ "devDependencies" : {
26
+ "@testing-library/dom" : " ^10.4.0" ,
27
+ "@testing-library/jest-dom" : " ^6.6.3" ,
28
+ "@testing-library/user-event" : " ^14.6.1" ,
29
+ "jest" : " ^30.0.4" ,
30
+ "jest-environment-jsdom" : " ^30.0.4"
31
+ }
35
32
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 4
4
"license" : " CC-BY-SA-4.0" ,
5
5
"description" : " You must update this package" ,
6
6
"scripts" : {
7
- "test" : " jest"
7
+ "test" : " jest --config=../jest.config.js quote-generator "
8
8
},
9
9
"repository" : {
10
10
"type" : " git" ,
13
13
"bugs" : {
14
14
"url" : " https://github.com/CodeYourFuture/CYF-Coursework-Template/issues"
15
15
},
16
- "homepage" : " https://github.com/CodeYourFuture/CYF-Coursework-Template#readme" ,
17
- "devDependencies" : {
18
- "@testing-library/dom" : " ^8.19.0" ,
19
- "@testing-library/jest-dom" : " ^5.16.5" ,
20
- "@testing-library/user-event" : " ^13.5.0" ,
21
- "jest" : " ^29.2.2" ,
22
- "jest-environment-jsdom" : " ^29.2.2"
23
- },
24
- "jest" : {
25
- "setupFilesAfterEnv" : [
26
- " ./jest.setup.js"
27
- ]
28
- }
16
+ "homepage" : " https://github.com/CodeYourFuture/CYF-Coursework-Template#readme"
29
17
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments