• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1var WEB_ANIMATIONS_TESTING = true;
2var webAnimationsTesting = window;
3var assert = chai.assert;
4mocha.setup({ ui: 'tdd' });
5
6function loadWebAnimationsBuildTarget(target) {
7  var config = webAnimationsTargetConfig[target];
8  config.src.concat(config.test).forEach(function(file) {
9    document.write('<script src="../' + file + '"></script>\n');
10  });
11}
12
13(function() {
14
15  var pageError = null;
16
17  addEventListener('error', function(event) {
18    pageError = event.filename + ':' + event.lineno + ' ' + event.message;
19  });
20
21  addEventListener('load', function() {
22
23    // Inject test suite for page errors if any encountered.
24    if (pageError) {
25      suite('page-script-errors', function() {
26        test('no script errors on page', function() {
27          assert.fail(null, null, pageError);
28        });
29      });
30    }
31
32    mocha.run();
33  });
34
35})();
36