Skip to content

Commit cf8aee1

Browse files
authored
refactor(karma): Updating and using karma debug
Updating and using karma debug to figure out why the build is failing.
1 parent b15815e commit cf8aee1

File tree

5 files changed

+12
-30
lines changed

5 files changed

+12
-30
lines changed

grunt/karma.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var util = require('../lib/grunt/utils.js');
33
module.exports = function( grunt ){
44
var baseConfig = {
55
options: {
6-
configFile: 'test/karma.conf.js',
6+
configFile: 'test/karma.debug.conf.js',
77
background: true,
88
},
99
// dev: {

lib/sauce/sauce_connect_block.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ then
66
while [ ! -f $SAUCE_CONNECT_READY_FILE ]; do
77
sleep .5
88
done
9-
fi
9+
fi

lib/sauce/sauce_connect_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ echo " $CONNECT_LOG"
5959
echo " $CONNECT_STDOUT"
6060
echo " $CONNECT_STDERR"
6161
java -jar Sauce-Connect.jar $ARGS $SAUCE_USERNAME $SAUCE_ACCESS_KEY \
62-
--logfile $CONNECT_LOG 2> $CONNECT_STDERR 1> $CONNECT_STDOUT &
62+
--logfile $CONNECT_LOG 2> $CONNECT_STDERR 1> $CONNECT_STDOUT &

test/karma.conf.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,14 @@ module.exports = function(config) {
3030
'src/features/**/test/**/*.spec.js',
3131

3232
'dist/release/ui-grid.css',
33-
'src/font/*',
3433

3534
'.tmp/template.js' // templates
3635
],
3736

38-
// Ensures that font files do not cause a 404 error
39-
proxies: {
40-
'/base/dist/release/ui-grid.woff': 'src/font/ui-grid.woff',
41-
'/base/dist/release/ui-grid.ttf': 'src/font/ui-grid.ttf',
42-
'/base/dist/release/ui-grid.svg': 'src/font/ui-grid.svg'
43-
},
44-
4537
// list of files to exclude
4638
exclude: [
4739
],
4840

49-
5041
// test results reporter to use
5142
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
5243
reporters: ['dots', 'coverage'],

test/karma.debug.conf.js

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ module.exports = function(config) {
1010
basePath: '../',
1111

1212
// frameworks to use
13-
frameworks: ['jasmine2'],
13+
frameworks: ['jasmine'],
1414

15-
// list of files / patterns to load in the browser (we add more dynamically in our tasks)
15+
// list of files / patterns to load in the browser
16+
// note that the karmangular setup from util.createKarmangularConfig seems
17+
// to take precedence over this, but we can't remove this because then
18+
// the karmangular task doesn't appear to run. So includes the features/**/test, but
19+
// they don't get run if you've used the --fast or --core options
1620
files: [
1721
'bower_components/jquery/jquery.min.js',
1822
'lib/test/jquery.simulate.js',
1923
'lib/test/classList.polyFill.js',
2024
'bower_components/lodash/dist/lodash.min.js',
2125

22-
'lib/test/angular/1.5.0/angular.js',
23-
'lib/test/angular/1.5.0/angular-mocks.js',
24-
'lib/test/angular/1.5.0/angular-animate.js',
25-
2626
'src/js/core/bootstrap.js',
2727
'src/js/**/*.js',
2828
'src/features/**/js/**/*.js',
@@ -31,22 +31,13 @@ module.exports = function(config) {
3131

3232
'dist/release/ui-grid.css',
3333

34-
'.tmp/template.js' //templates
34+
'.tmp/template.js' // templates
3535
],
3636

37-
// Ensures that font files do not cause a 404 error
38-
proxies: {
39-
'/base/dist/release/ui-grid.woff': 'src/font/ui-grid.woff',
40-
'/base/dist/release/ui-grid.ttf': 'src/font/ui-grid.ttf',
41-
'/base/dist/release/ui-grid.svg': 'src/font/ui-grid.svg'
42-
},
43-
44-
4537
// list of files to exclude
4638
exclude: [
4739
],
4840

49-
5041
// test results reporter to use
5142
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
5243
reporters: ['dots', 'coverage'],
@@ -72,7 +63,7 @@ module.exports = function(config) {
7263

7364
// level of logging
7465
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
75-
logLevel: config.LOG_INFO,
66+
logLevel: config.LOG_DEBUG,
7667

7768

7869
// enable / disable watching file and executing tests whenever any file changes
@@ -117,7 +108,7 @@ module.exports = function(config) {
117108
// TODO(c0bra): remove once SauceLabs supports websockets.
118109
// This speeds up the capturing a bit, as browsers don't even try to use websocket. -- (thanks vojta)
119110
if (process.env.TRAVIS) {
120-
config.logLevel = config.LOG_INFO;
111+
config.logLevel = config.LOG_DEBUG;
121112
config.browserNoActivityTimeout = 120000; // NOTE: from angular.js, for socket.io buffer
122113
config.reporters = ['dots', 'coverage'];
123114

0 commit comments

Comments
 (0)