Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Defer karma tests until after WebComponentsReady
Browse files Browse the repository at this point in the history
Match mocha test runner timings
  • Loading branch information
dfreedm committed Sep 12, 2013
1 parent 1ac4907 commit 57e4d9c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/js/karma-defer-tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/

// defer start of tests until after WebComponentsReady event
if (window.__karma__) {
window.__karma__.loaded = function() {
window.addEventListener('WebComponentsReady', function() {
window.__karma__.start();
});
};
}

1 comment on commit 57e4d9c

@dfreedm
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be re-evaluated after karma-runner/karma#380 lands (karma v0.12?).

Please sign in to comment.