build(frontend): update karma config
This commit is contained in:
parent
c7d5cbfb49
commit
d4d18a968c
4
Makefile
4
Makefile
@ -112,8 +112,8 @@ frontend-%: node_modules well-known --frontend-%;
|
|||||||
@echo Hooray! There are no hints.
|
@echo Hooray! There are no hints.
|
||||||
|
|
||||||
.PHONY: --frontend-test
|
.PHONY: --frontend-test
|
||||||
--frontend-test: karma.conf.js
|
--frontend-test: karma.conf.cjs
|
||||||
npx -- karma start --conf karma.conf.js $(WATCH)
|
npx -- karma start --conf karma.conf.cjs $(WATCH)
|
||||||
|
|
||||||
.PHONY: --frontend-test-watch
|
.PHONY: --frontend-test-watch
|
||||||
--frontend-test-watch: WATCH=--single-run false
|
--frontend-test-watch: WATCH=--single-run false
|
||||||
|
|||||||
@ -27,4 +27,4 @@ RUN make node_modules
|
|||||||
RUN make well-known
|
RUN make well-known
|
||||||
|
|
||||||
ENV FRADRIVE_MAKE_TARGET=frontend-watch
|
ENV FRADRIVE_MAKE_TARGET=frontend-watch
|
||||||
ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} CHROME_BIN=${CHROME_BIN}
|
ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} CHROME_BIN=${CHROME_BIN}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>
|
// SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel <sarah.vaupel@uniworx.de>, Gregor Kleen <gregor.kleen@ifi.lmu.de>, Sarah Vaupel <vaupel.sarah@campus.lmu.de>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ module.exports = function(config) {
|
|||||||
logLevel: config.LOG_WARN, //config.LOG_DISABLE, config.LOG_ERROR, config.LOG_INFO, config.LOG_DEBUG
|
logLevel: config.LOG_WARN, //config.LOG_DISABLE, config.LOG_ERROR, config.LOG_INFO, config.LOG_DEBUG
|
||||||
|
|
||||||
//list of frameworks you want to use, only jasmine is installed automatically
|
//list of frameworks you want to use, only jasmine is installed automatically
|
||||||
frameworks: ['jasmine'],
|
frameworks: ['jasmine', 'browserify'],
|
||||||
//list of browsers to launch and capture
|
//list of browsers to launch and capture
|
||||||
browsers: ['ChromeHeadless'],
|
browsers: ['ChromeHeadless'],
|
||||||
//list of reporters to use
|
//list of reporters to use
|
||||||
@ -56,8 +56,11 @@ module.exports = function(config) {
|
|||||||
},
|
},
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
//add webpack as preprocessor to support require() in test-suits .js files
|
//add webpack as preprocessor to support require() in test-suits .js files
|
||||||
'./frontend/src/**/*.js': ['webpack']
|
'./frontend/src/**/*.js': ['browserify']
|
||||||
},
|
},
|
||||||
|
plugins: [
|
||||||
|
'karma-browserify'
|
||||||
|
],
|
||||||
webpackMiddleware: {
|
webpackMiddleware: {
|
||||||
//turn off webpack bash output when run the tests
|
//turn off webpack bash output when run the tests
|
||||||
noInfo: true,
|
noInfo: true,
|
||||||
2042
package-lock.json
generated
2042
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -38,6 +38,7 @@
|
|||||||
"jasmine-core": "^5.2.0",
|
"jasmine-core": "^5.2.0",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"karma": "^6.4.4",
|
"karma": "^6.4.4",
|
||||||
|
"karma-browserify": "^8.1.0",
|
||||||
"karma-chrome-launcher": "^3.2.0",
|
"karma-chrome-launcher": "^3.2.0",
|
||||||
"karma-cli": "^2.0.0",
|
"karma-cli": "^2.0.0",
|
||||||
"karma-jasmine": "^5.1.0",
|
"karma-jasmine": "^5.1.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user