Skip to content

Commit

Permalink
chore(test): improve reporting and test libs only
Browse files Browse the repository at this point in the history
* use karma spec reporter to show karma results instead of dots
* Fix RangeError in Gulp caused by watching the apps directory in
  addition to the library source

Closes #684.
  • Loading branch information
CaerusKaru authored and ThomasBurleson committed Mar 20, 2018
1 parent 7cedf6f commit 6dc3d3a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
17 changes: 17 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"karma-firefox-launcher": "^1.0.1",
"karma-jasmine": "^1.1.1",
"karma-sauce-launcher": "^1.2.0",
"karma-spec-reporter": "^0.0.32",
"karma-sourcemap-loader": "^0.3.7",
"madge": "^3.0.0",
"magic-string": "^0.22.4",
Expand Down
18 changes: 12 additions & 6 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module.exports = (config) => {
require('karma-chrome-launcher'),
require('karma-firefox-launcher'),
require('karma-sourcemap-loader'),
require('karma-coverage')
require('karma-coverage'),
require('karma-spec-reporter')
],
files: [
{pattern: 'node_modules/core-js/client/core.js', included: true, watched: false},
Expand Down Expand Up @@ -49,7 +50,7 @@ module.exports = (config) => {
'dist/packages/**/*.js': ['sourcemap']
},

reporters: ['dots'],
reporters: ['spec'],
autoWatch: false,

coverageReporter: {
Expand All @@ -58,6 +59,10 @@ module.exports = (config) => {
subdir: '.'
},

specReporter: {
maxLogLines: 1,
},

sauceLabs: {
testName: 'flex-layout',
startConnect: false,
Expand All @@ -78,14 +83,15 @@ module.exports = (config) => {
project: 'flex-layout',
startTunnel: false,
retryLimit: 1,
timeout: 600,
timeout: 1800,
pollingTimeout: 20000,
video: false
},

browserDisconnectTimeout: 20000,
browserNoActivityTimeout: 240000,
captureTimeout: 120000,
browserDisconnectTimeout: 180000,
browserDisconnectTolerance: 3,
browserNoActivityTimeout: 300000,
captureTimeout: 180000,
browsers: ['ChromeHeadlessCISandbox'],

singleRun: false,
Expand Down
2 changes: 1 addition & 1 deletion tools/gulp/tasks/unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ task('test:single-run', [':test:build'], (done: () => void) => {
* This task should be used when running unit tests locally.
*/
task('test', [':test:build'], () => {
let patternRoot = join(packagesDir, '**/*');
let patternRoot = join(packagesDir, 'lib', '**/*');
// Load karma not outside. Karma pollutes Promise with a different implementation.
let karma = require('karma');

Expand Down

0 comments on commit 6dc3d3a

Please sign in to comment.