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
33.vscode
44** /.DS_Store
55.idea
6+ package-lock.json
Original file line number Diff line number Diff line change 55 " streetsidesoftware.code-spell-checker" ,
66 " eamodio.gitlens" ,
77 " ritwickdey.LiveServer" ,
8- " vsliveshare.vsliveshare"
8+ " vsliveshare.vsliveshare" ,
9+ " Orta.vscode-jest"
910 ]
1011}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 44 "license" : " CC-BY-SA-4.0" ,
55 "description" : " You must update this package" ,
66 "scripts" : {
7- "test" : " jest"
7+ "test" : " jest --config=../jest.config.js alarmclock "
88 },
99 "repository" : {
1010 "type" : " git" ,
1313 "bugs" : {
1414 "url" : " https://github.com/CodeYourFuture/CYF-Coursework-Template/issues"
1515 },
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"
2917}
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 44 "license" : " CC-BY-SA-4.0" ,
55 "description" : " " ,
66 "scripts" : {
7- "test" : " jest --testMatch='**/*.js' " ,
7+ "test" : " jest" ,
88 "format" : " prettier --write ."
99 },
10- "jest" : {
11- "testPathIgnorePatterns" : [
12- " alarmclock" ,
13- " highlight-words" ,
14- " slideshow" ,
15- " reading-list" ,
16- " todo-list" ,
17- " quote-generator"
18- ]
19- },
2010 "workspaces" : [
2111 " alarmclock" ,
12+ " quote-generator" ,
2213 " reading-list" ,
23- " highlight-words" ,
24- " todo-list" ,
25- " slideshow"
14+ " slideshow" ,
15+ " todo-list"
2616 ],
2717 "repository" : {
2818 "type" : " git" ,
3121 "bugs" : {
3222 "url" : " https://github.com/CodeYourFuture/Module-Data-Groups/issues"
3323 },
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+ }
3532}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 44 "license" : " CC-BY-SA-4.0" ,
55 "description" : " You must update this package" ,
66 "scripts" : {
7- "test" : " jest"
7+ "test" : " jest --config=../jest.config.js quote-generator "
88 },
99 "repository" : {
1010 "type" : " git" ,
1313 "bugs" : {
1414 "url" : " https://github.com/CodeYourFuture/CYF-Coursework-Template/issues"
1515 },
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"
2917}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments