Skip to content

Commit 955b50b

Browse files
authored
Merge branch 'CodeYourFuture:main' into Feature-alarmclock
2 parents 89b9b6a + ce620b7 commit 955b50b

File tree

15 files changed

+49
-91
lines changed

15 files changed

+49
-91
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
.vscode
44
**/.DS_Store
55
.idea
6+
package-lock.json

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"streetsidesoftware.code-spell-checker",
66
"eamodio.gitlens",
77
"ritwickdey.LiveServer",
8-
"vsliveshare.vsliveshare"
8+
"vsliveshare.vsliveshare",
9+
"Orta.vscode-jest"
910
]
1011
}

Sprint-3/alarmclock/jest.setup.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

Sprint-3/alarmclock/package.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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",
@@ -13,17 +13,5 @@
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
}

Sprint-3/jest.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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;

Sprint-3/jest.setup.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const { TextDecoder, TextEncoder } = require("node:util");
2+
3+
require("@testing-library/jest-dom");
4+
5+
global.TextDecoder = TextDecoder;
6+
global.TextEncoder = TextEncoder;

Sprint-3/package.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,15 @@
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",
@@ -31,5 +21,12 @@
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
}

Sprint-3/quote-generator/jest.setup.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

Sprint-3/quote-generator/package.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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",
@@ -13,17 +13,5 @@
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
}

Sprint-3/reading-list/jest.setup.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)