mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
web animation updates
This commit is contained in:
35
scripts/vendor/web-animations-js/test/runner.js
vendored
Executable file
35
scripts/vendor/web-animations-js/test/runner.js
vendored
Executable file
@ -0,0 +1,35 @@
|
||||
var WEB_ANIMATIONS_TESTING = true;
|
||||
var webAnimationsTesting = window;
|
||||
var assert = chai.assert;
|
||||
mocha.setup({ ui: 'tdd' });
|
||||
|
||||
function loadWebAnimationsBuildTarget(target) {
|
||||
var config = webAnimationsTargetConfig[target];
|
||||
config.src.concat(config.test).forEach(function(file) {
|
||||
document.write('<script src="../' + file + '"></script>\n');
|
||||
});
|
||||
}
|
||||
|
||||
(function() {
|
||||
|
||||
var pageError = null;
|
||||
|
||||
addEventListener('error', function(event) {
|
||||
pageError = event.filename + ':' + event.lineno + ' ' + event.message;
|
||||
});
|
||||
|
||||
addEventListener('load', function() {
|
||||
|
||||
// Inject test suite for page errors if any encountered.
|
||||
if (pageError) {
|
||||
suite('page-script-errors', function() {
|
||||
test('no script errors on page', function() {
|
||||
assert.fail(null, null, pageError);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
mocha.run();
|
||||
});
|
||||
|
||||
})();
|
Reference in New Issue
Block a user