Skip to content
This repository has been archived by the owner on Jun 21, 2020. It is now read-only.

Commit

Permalink
Convert tests to run with Karma.
Browse files Browse the repository at this point in the history
Refs #1.

Previously we used Jasmine, however this runs within Node. Using Karma for debug tests and Jasmine for normal tests, means that one set runs in a browser and the other set runs in Node, which creates some discrepancies. By using Karma, all tests are consistently running in a browser. Running in a browsers is preferable to Node, because the browser is closer to the real runtime where bxpb will be used.
  • Loading branch information
dgp1130 committed May 3, 2020
1 parent c235d22 commit 1c11efd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
34 changes: 24 additions & 10 deletions packages/bxpb-runtime/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/bxpb-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"scripts": {
"build": "tsc",
"test": "tsc -p tsconfig.spec.json && jasmine",
"test": "karma start --browsers ChromeHeadless --singleRun",
"test:debug": "karma start"
},
"bugs": {
Expand All @@ -31,8 +31,8 @@
"@types/chrome": "^0.0.106",
"@types/google-protobuf": "^3.7.2",
"@types/jasmine": "^3.5.10",
"jasmine": "^3.5.0",
"karma": "^5.0.4",
"karma-chrome-launcher": "^3.1.0",
"karma-jasmine": "^3.1.1",
"karma-jasmine-html-reporter": "^1.5.3",
"karma-typescript": "^5.0.2",
Expand Down
8 changes: 0 additions & 8 deletions packages/bxpb-runtime/spec/support/jasmine.json

This file was deleted.

0 comments on commit 1c11efd

Please sign in to comment.