test: Type-check test files.

Closes https://github.com/solid/community-server/issues/415
This commit is contained in:
Ruben Verborgh 2020-12-10 16:42:07 +00:00
parent 0451781b7f
commit dedf579a08
3 changed files with 6 additions and 1 deletions

View File

@ -43,6 +43,7 @@ jobs:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- run: npm ci - run: npm ci
- run: npm run validate - run: npm run validate
- run: npm run test:tsc
- run: npm run test:unit - run: npm run test:unit
- name: Coveralls - name: Coveralls
uses: coverallsapp/github-action@master uses: coverallsapp/github-action@master

View File

@ -50,8 +50,9 @@
"lint": "eslint . --ext .ts --cache", "lint": "eslint . --ext .ts --cache",
"prepare": "npm run build", "prepare": "npm run build",
"start": "node ./bin/server.js -p 3000", "start": "node ./bin/server.js -p 3000",
"test": "npm run jest", "test": "npm run test:tsc && npm run jest",
"test:deploy": "test/deploy/validate-package.sh", "test:deploy": "test/deploy/validate-package.sh",
"test:tsc": "tsc -p test --noEmit",
"test:integration": "jest --coverageThreshold '{}' test/integration", "test:integration": "jest --coverageThreshold '{}' test/integration",
"test:unit": "jest test/unit", "test:unit": "jest test/unit",
"validate": "componentsjs-compile-config urn:solid-server:default:Initializer -c config/config-default.json -f > /dev/null", "validate": "componentsjs-compile-config urn:solid-server:default:Initializer -c config/config-default.json -f > /dev/null",

View File

@ -1,6 +1,9 @@
{ {
"compilerOptions": { "compilerOptions": {
"module": "commonjs",
"target": "es2017",
"esModuleInterop": true, "esModuleInterop": true,
"incremental": true,
"noUnusedLocals": true, "noUnusedLocals": true,
"strict": true "strict": true
} }