X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=client%2Fpackage.json;h=8426216bb3a5bdcb3596ce8237093e17ba4f8673;hb=b0c36821d1dcf362f14c99ca3741e7d03aea0a04;hp=12da38175bb777be9b27bd9d998306f97d14720b;hpb=5cf84858d49f4231cc4efec5e3132f17f65f6cf6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/package.json b/client/package.json index 12da38175..8426216bb 100644 --- a/client/package.json +++ b/client/package.json @@ -21,7 +21,7 @@ "webpack-bundle-analyzer": "webpack-bundle-analyzer", "webdriver-manager": "webdriver-manager", "ngx-extractor": "ngx-extractor", - "test": "jest" + "test": "jest --no-cache" }, "license": "GPLv3", "typings": "*.d.ts", @@ -31,13 +31,23 @@ "simple-get": "^2.8.1" }, "jest": { + "globals": { + "ts-jest": { + "tsConfigFile": "/src/tsconfig.spec.json" + }, + "__TRANSFORM_HTML__": true + }, "transform": { - "^.+\\.tsx?$": "ts-jest" + "^.+\\.(ts|js|html)$": "/node_modules/jest-preset-angular/preprocessor.js" }, "moduleNameMapper": { - "^@app/(.*)": "/src/app/$1" + "^@app/(.*)": "/src/app/$1", + "environments/(.*)": "/src/environments/$1" }, - "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", + "testMatch": [ + "**/__tests__/**/*.+(ts|js)?(x)", + "**/+(*.)+(spec|test).+(ts|js)?(x)" + ], "moduleFileExtensions": [ "ts", "tsx", @@ -45,7 +55,12 @@ "jsx", "json", "node" - ] + ], + "transformIgnorePatterns": [ + "/node_modules/(?!lodash-es/)" + ], + "preset": "jest-preset-angular", + "setupTestFrameworkScriptFile": "/src/setupJest.ts" }, "devDependencies": { "@angular-devkit/build-angular": "^0.7.5", @@ -99,6 +114,7 @@ "jasmine-core": "^3.1.0", "jasmine-spec-reporter": "^4.2.1", "jest": "^23.5.0", + "jest-preset-angular": "^6.0.0", "jschannel": "^1.0.2", "karma": "^3.0.0", "karma-chrome-launcher": "^2.2.0",