Skip to content

Commit 7213877

Browse files
committed
feat(client): show error if no adapter is included
Before this fix, Karma would just execute "an empty" test suite. The next run would however end up with an exception (Property "start" is not a function). This should make it easier to understand.
1 parent 3308b98 commit 7213877

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/karma.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ var Karma = function(socket, context, navigator, location) {
177177

178178
// supposed to be overriden by the context
179179
// TODO(vojta): support multiple callbacks (queue)
180-
this.start = this.complete;
180+
this.start = function() {
181+
this.error('You need to include some adapter that implements __karma__.start method!');
182+
};
181183

182184
socket.on('execute', function(cfg) {
183185
// reset hasError and reload the iframe

0 commit comments

Comments
 (0)