Commit e696dc4d by Tobias Skarhed

Remove Karma scripts and docs

parent 8dbc75ce
......@@ -7,7 +7,11 @@ grunt && grunt watch
### Rerun tests on source change
```
grunt karma:dev
npm jest
```
or
```
yarn jest
```
### Run tests for backend assets before commit
......
......@@ -59,11 +59,6 @@ Run tests
yarn run jest
```
Run karma tests
```bash
yarn run karma
```
### Recompile backend on source change
To rebuild on source change.
......@@ -101,14 +96,11 @@ Execute all frontend tests
yarn run test
```
Writing & watching frontend tests (we have two test runners)
Writing & watching frontend tests
- jest for all new tests that do not require browser context (React+more)
- Start watcher: `yarn run jest`
- Jest will run all test files that end with the name ".jest.ts"
- karma + mocha is used for testing angularjs components. We do want to migrate these test to jest over time (if possible).
- Start watcher: `yarn run karma`
- Karma+Mocha runs all files that end with the name "_specs.ts".
- Jest will run all test files that end with the name ".test.ts"
#### Backend
```bash
......
......@@ -90,14 +90,12 @@ You'll also need to run `npm run watch` to watch for changes to the front-end (t
- You can run backend Golang tests using "go test ./pkg/...".
- Execute all frontend tests with "npm run test"
Writing & watching frontend tests (we have two test runners)
Writing & watching frontend tests
- jest for all new tests that do not require browser context (React+more)
- Start watcher: `npm run jest`
- Jest will run all test files that end with the name ".jest.ts"
- karma + mocha is used for testing angularjs components. We do want to migrate these test to jest over time (if possible).
- Start watcher: `npm run karma`
- Karma+Mocha runs all files that end with the name "_specs.ts".
- Jest will run all test files that end with the name ".test.ts"
## Creating optimized release packages
......
......@@ -46,7 +46,6 @@
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-cssmin": "~1.0.2",
"grunt-exec": "^1.0.1",
"grunt-karma": "~2.0.0",
"grunt-notify": "^0.4.5",
"grunt-postcss": "^0.8.0",
"grunt-sass": "^2.0.0",
......@@ -58,14 +57,6 @@
"html-webpack-plugin": "^3.2.0",
"husky": "^0.14.3",
"jest": "^22.0.4",
"karma": "1.7.0",
"karma-chrome-launcher": "~2.2.0",
"karma-expect": "~1.1.3",
"karma-mocha": "~1.3.0",
"karma-phantomjs-launcher": "1.0.4",
"karma-sinon": "^1.0.5",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^3.0.0",
"lint-staged": "^6.0.0",
"load-grunt-tasks": "3.5.2",
"mini-css-extract-plugin": "^0.4.0",
......@@ -112,7 +103,6 @@
"test": "grunt test",
"test:coverage": "grunt test --coverage=true",
"lint": "tslint -c tslint.json --project tsconfig.json --type-check",
"karma": "grunt karma:dev",
"jest": "jest --notify --watch",
"api-tests": "jest --notify --watch --config=tests/api/jest.js",
"precommit": "lint-staged && grunt precommit"
......
......@@ -12,7 +12,6 @@ module.exports = function(grunt) {
'sasslint',
'exec:tslint',
"exec:jest",
'karma:test',
'no-only-tests'
]);
......
module.exports = function (config) {
'use strict';
return {
dev: {
configFile: 'karma.conf.js',
singleRun: false,
},
debug: {
configFile: 'karma.conf.js',
singleRun: false,
browsers: ['Chrome'],
mime: {
'text/x-typescript': ['ts', 'tsx']
},
},
test: {
configFile: 'karma.conf.js',
}
};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment