test: Reduce integration test memory usage

This commit is contained in:
Joachim Van Herwegen 2022-11-02 15:09:08 +01:00
parent 334364918f
commit 80fa81a556
3 changed files with 9 additions and 8 deletions

View File

@ -14,13 +14,7 @@ module.exports = {
],
testEnvironment: 'node',
setupFilesAfterEnv: [ 'jest-rdf', '<rootDir>/test/util/SetupTests.ts' ],
collectCoverage: true,
coverageReporters: [ 'text', 'lcov' ],
coveragePathIgnorePatterns: [
'/dist/',
'/node_modules/',
'/test/',
],
collectCoverage: false,
// See https://github.com/matthieubosquet/ts-dpop/issues/13
moduleNameMapper: {
'^jose/(.*)$': '<rootDir>/node_modules/jose/dist/node/cjs/$1',

View File

@ -2,6 +2,13 @@ const jestConfig = require('./jest.config');
module.exports = {
...jestConfig,
collectCoverage: true,
coverageReporters: [ 'text', 'lcov' ],
coveragePathIgnorePatterns: [
'/dist/',
'/node_modules/',
'/test/',
],
coverageThreshold: {
'./src': {
branches: 100,

View File

@ -68,7 +68,7 @@
"test": "npm run test:ts && npm run jest",
"test:deploy": "test/deploy/validate-configs.sh",
"test:ts": "tsc -p test --noEmit",
"test:integration": "jest --coverageReporters text-summary -- test/integration",
"test:integration": "node --expose-gc --no-compilation-cache ./node_modules/jest/bin/jest.js -- test/integration",
"test:unit": "jest --config=./jest.coverage.config.js test/unit",
"test:watch": "jest --coverageReporters none --watch test/unit",
"validate": "componentsjs-compile-config urn:solid-server:default:Initializer -c config/default.json -f > /dev/null",