Skip to content

Commit 25a1077

Browse files
patrickshaughnessyjohnpapa
authored andcommitted
update angular 1 karma test runner code snippet to following updated karma api (#756)
thanks!
1 parent 04608f1 commit 25a1077

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

a1/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,7 +2552,7 @@ Unit testing helps maintain clean code, as such I included some of my recommenda
25522552
var child;
25532553
var excludeFiles = [];
25542554
var fork = require('child_process').fork;
2555-
var karma = require('karma').server;
2555+
var Server = require('karma').Server;
25562556
var serverSpecs = config.serverIntegrationSpecs;
25572557

25582558
if (args.startServers) {
@@ -2567,11 +2567,14 @@ Unit testing helps maintain clean code, as such I included some of my recommenda
25672567
}
25682568
}
25692569

2570-
karma.start({
2571-
configFile: __dirname + '/karma.conf.js',
2572-
exclude: excludeFiles,
2573-
singleRun: !!singleRun
2574-
}, karmaCompleted);
2570+
var karmaOptions = {
2571+
configFile: __dirname + '/karma.conf.js',
2572+
exclude: excludeFiles,
2573+
singleRun: !!singleRun
2574+
};
2575+
2576+
let server = new Server(karmaOptions, karmaCompleted);
2577+
server.start();
25752578

25762579
////////////////
25772580

0 commit comments

Comments
 (0)