Fix frontend tests
This commit is contained in:
parent
68b79081b3
commit
6670bb30de
5 changed files with 13 additions and 8 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -6,7 +6,9 @@
|
|||
/node_modules
|
||||
/frontend/.eslintcache
|
||||
/frontend/node_modules/*
|
||||
/frontend/tests/result.html
|
||||
/frontend/tests/*.html
|
||||
/frontend/tests/*.log
|
||||
/frontend/tests/screenshots
|
||||
/assets/testdata
|
||||
/assets/backups
|
||||
/assets/tensorflow/nasnet
|
||||
|
@ -46,4 +48,3 @@ Thumbs.db
|
|||
.tmp
|
||||
|
||||
# Acceptance Test Screenshots
|
||||
/frontend/tests/acceptance/screenshots
|
6
Makefile
6
Makefile
|
@ -42,6 +42,10 @@ build-go:
|
|||
scripts/build.sh debug $(BINARY_NAME)
|
||||
test-js:
|
||||
(cd frontend && env NODE_ENV=development npm run test)
|
||||
test-chromium:
|
||||
(cd frontend && npm run test-chromium)
|
||||
test-firefox:
|
||||
(cd frontend && npm run test-firefox)
|
||||
test-go:
|
||||
go test -tags=slow -timeout 20m -v ./internal/... | scripts/colorize-tests.sh
|
||||
test-short:
|
||||
|
@ -54,8 +58,6 @@ test-codecov:
|
|||
test-coverage:
|
||||
go test -tags=slow -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./internal/...
|
||||
go tool cover -html=coverage.txt -o coverage.html
|
||||
test-acceptance:
|
||||
testcafe chromium:headless -S -s frontend/tests/screenshots frontend/tests/acceptance/
|
||||
clean:
|
||||
rm -f $(BINARY_NAME)
|
||||
rm -f *.log
|
||||
|
|
|
@ -28,7 +28,7 @@ module.exports = (config) => {
|
|||
reporters: ["progress", "html"],
|
||||
|
||||
htmlReporter: {
|
||||
outputFile: "tests/unit/result.html",
|
||||
outputFile: "tests/unit.html",
|
||||
},
|
||||
|
||||
webpack: {
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
"build": "webpack --optimize-minimize",
|
||||
"lint": "eslint --cache src/ *.js",
|
||||
"fmt": "eslint --cache --fix src/ *.js",
|
||||
"test": "karma start"
|
||||
"test": "karma start",
|
||||
"test-chromium": "testcafe chromium:headless -S -s tests/screenshots tests/acceptance",
|
||||
"test-firefox": "testcafe firefox:headless -S -s tests/screenshots tests/acceptance"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import assert from 'assert';
|
||||
import Api from 'common/api';
|
||||
import MockAdapter from 'axios-mock-adapter/types';
|
||||
import MockAdapter from 'axios-mock-adapter';
|
||||
|
||||
const mock = new MockAdapter(Api);
|
||||
|
||||
|
@ -103,4 +103,4 @@ describe('common/api', () => {
|
|||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue