Skip to content
Snippets Groups Projects
Commit a3dafbe7 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

rollup: add a new test-full command and run tests without terser/babel by default

babel and terser make tests run really slow, so try to make it optional.
parent 3f83b469
No related branches found
No related tags found
No related merge requests found
Pipeline #12050 passed with warnings
......@@ -13,7 +13,7 @@ test:
script:
- npm install
- npm run build-dev
- npm test
- npm run test-full
linting:
stage: test
......
......@@ -68,8 +68,9 @@
"i18next": "i18next-scanner",
"watch": "rollup -c --watch",
"watch-local": "npm run watch",
"watch-full": "rollup -c --watch --environment WATCH_FULL",
"watch-full": "rollup -c --watch --environment FORCE_FULL",
"test": "rollup -c --environment BUILD:test && karma start --singleRun",
"test-full": "rollup -c --environment FORCE_FULL,BUILD:test && karma start --singleRun",
"lint": "eslint ."
}
}
......@@ -29,7 +29,8 @@ const USE_HTTPS = false;
const pkg = require('./package.json');
const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : 'local';
const watch = process.env.ROLLUP_WATCH === 'true';
const watchFull = process.env.WATCH_FULL !== undefined;
const buildFull = (!watch && build !== 'test') || (process.env.FORCE_FULL !== undefined);
console.log("build: " + build);
let basePath = '';
let entryPointURL = '';
......@@ -41,9 +42,9 @@ let keyCloakBaseURL = '';
let keyCloakClientId = '';
let pdfAsQualifiedlySigningServer = '';
let matomoSiteId = 131;
let useTerser = !watch || watchFull;
let useBabel = !watch || watchFull;
let checkLicenses = !watch || watchFull;
let useTerser = buildFull;
let useBabel = buildFull;
let checkLicenses = buildFull;
switch (build) {
case 'local':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment