Skip to content

Commit

Permalink
Bootstrap tests asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
threema-danilo committed May 13, 2019
1 parent 4d1cf83 commit 52a8edc
Show file tree
Hide file tree
Showing 14 changed files with 787 additions and 1,674 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -82,8 +82,8 @@ Web on a server, please follow the instructions at

To run unit tests:

npm run build:unittests
firefox tests/testsuite.html
npm run build:unittests && npm run testserver
firefox http://localhost:7777/tests/testsuite.html

To run UI tests:

Expand Down
31 changes: 26 additions & 5 deletions karma.conf.js
Expand Up @@ -2,16 +2,33 @@ module.exports = function(config) {

var configuration = {
frameworks: ['jasmine'],
mime: {
'application/wasm': ['wasm'],
},
files: [
// Angular core
'node_modules/angular/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
'node_modules/angular-translate/dist/angular-translate.min.js',
'node_modules/angular-aria/angular-aria.min.js',
'node_modules/angular-animate/angular-animate.min.js',
'node_modules/angular-sanitize/angular-sanitize.min.js',
'node_modules/angular-route/angular-route.min.js',
'node_modules/angular-material/angular-material.min.js',
'node_modules/angular-translate/dist/angular-translate.min.js',

// Angular mocking
'node_modules/angular-mocks/angular-mocks.js',

// SaltyRTC
'node_modules/@saltyrtc/chunked-dc/dist/chunked-dc.es5.js',
'dist/app.bundle.js',
'dist/unittests.bundle.js',

// App bundles
'dist/generated/app_noinit.bundle.js',
'dist/generated/unittest_karma.bundle.js',
{pattern: 'dist/generated/[0-9].*.bundle.js', included: false, serve: true},
{pattern: 'dist/generated/*.module.wasm', included: false, serve: true, type: 'wasm'},

// Tests
'tests/init.js',
'tests/filters.js',
'tests/service/message.js',
'tests/service/mime.js',
Expand All @@ -23,8 +40,12 @@ module.exports = function(config) {
'tests/service/keystore.js',
'tests/service/notification.js',
'tests/service/receiver.js',
'tests/ts/helpers.ts',
],
proxies: {
// Also serve all generated files on the root.
// This is required for the .wasm modules.
'/dist/generated/': '/base/dist/generated/',
},
customLaunchers: {
Chromium_ci_gitlab: {
base: 'Chromium',
Expand Down

0 comments on commit 52a8edc

Please sign in to comment.