|
8 | 8 | "dist/"
|
9 | 9 | ],
|
10 | 10 | "scripts": {
|
11 |
| - "test": "jest", |
| 11 | + "test": "yarn --frozen-lockfile --check-files && yarn compile && yarn link && cd test/puppeteer && yarn --frozen-lockfile --check-files && yarn link \"w3c-css-validator\" && npx webpack && cd ../../ && jest", |
12 | 12 | "lint": "eslint --ext .js,.ts . && prettier --check '**/*.{ts,js,json,yml}'",
|
13 | 13 | "format": "eslint --fix --ext .js,.ts . && prettier --write '**/*.{ts,js,json,yml}'",
|
14 | 14 | "clean": "rm -rf node_modules/ coverage/ dist/",
|
|
36 | 36 | "@babel/preset-env": "^7.12.13",
|
37 | 37 | "@babel/preset-typescript": "^7.12.13",
|
38 | 38 | "@types/jest": "^26.0.20",
|
| 39 | + "@types/jest-environment-puppeteer": "^4.4.1", |
39 | 40 | "@types/node": "^14.14.25",
|
40 | 41 | "@typescript-eslint/eslint-plugin": "^4.14.2",
|
41 | 42 | "@typescript-eslint/parser": "^4.14.2",
|
42 | 43 | "eslint": "^7.19.0",
|
43 | 44 | "eslint-config-prettier": "^7.2.0",
|
44 | 45 | "jest": "^26.6.3",
|
| 46 | + "jest-puppeteer": "^4.4.0", |
45 | 47 | "prettier": "^2.2.1",
|
| 48 | + "puppeteer": "^7.1.0", |
46 | 49 | "typescript": "^4.1.3"
|
47 | 50 | },
|
48 | 51 | "jest": {
|
|
51 | 54 | "collectCoverageFrom": [
|
52 | 55 | "<rootDir>/src/**"
|
53 | 56 | ],
|
54 |
| - "testMatch": [ |
55 |
| - "<rootDir>/test/*.test.ts" |
56 |
| - ], |
57 |
| - "verbose": true |
| 57 | + "verbose": true, |
| 58 | + "projects": [ |
| 59 | + { |
| 60 | + "displayName": "Jest", |
| 61 | + "testMatch": [ |
| 62 | + "<rootDir>/test/*.test.ts" |
| 63 | + ] |
| 64 | + }, |
| 65 | + { |
| 66 | + "displayName": "Puppeteer", |
| 67 | + "preset": "jest-puppeteer", |
| 68 | + "testMatch": [ |
| 69 | + "<rootDir>/test/puppeteer/*.test.ts" |
| 70 | + ] |
| 71 | + } |
| 72 | + ] |
58 | 73 | }
|
59 | 74 | }
|
0 commit comments