-
Notifications
You must be signed in to change notification settings - Fork 380
/
qunit2.js
29 lines (29 loc) · 956 Bytes
/
qunit2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*funcunit@3.4.1#browser/adapters/qunit2*/
define(function (require, exports, module) {
var FuncUnit = require('../core');
module.exports = function (QUnit) {
var done;
var currentTestAssert;
var originalTest = QUnit.test;
QUnit.test = function funcunitTest(title, test) {
return originalTest(title, function (assert) {
currentTestAssert = assert;
return test.apply(this, arugments);
});
};
return {
pauseTest: function () {
done = currentTestAssert.async();
},
resumeTest: function () {
done();
},
assertOK: function (assertion, message) {
currentTestAssert.ok(assertion, message);
},
equiv: function (expected, actual) {
return QUnit.equiv(expected, actual);
}
};
};
});