forked from ExactTarget/fuelux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests-no-moment.js
47 lines (38 loc) · 1.16 KB
/
tests-no-moment.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/
/*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/
/*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/
define(function(require){
var $ = require('jquery');
QUnit.start(); // starting qunit, or phantom js will have a problem
// Needed for saucelab testing
var log = [];
var testName;
QUnit.done(function (test_results) {
var tests = [];
for(var i = 0, len = log.length; i < len; i++) {
var details = log[i];
tests.push({
name: details.name,
result: details.result,
expected: details.expected,
actual: details.actual,
source: details.source
});
}
test_results.tests = tests;
window.global_test_results = test_results;
// hide passed tests, helps with VM testing screencasts
if (!$('#qunit-filter-pass').is(':checked')) {
$('#qunit-filter-pass').click();
}
});
QUnit.testStart(function(testDetails){
QUnit.log = function(details){
if (!details.result) {
details.name = testDetails.name;
log.push(details);
}
};
});
require('test/datepicker-test');
});