forked from Patternslib/Patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.js
82 lines (80 loc) · 2.75 KB
/
tests.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* jshint sub: true */
/* global config */
//
config.paths["jasmine"] = "bower_components/jasmine/lib/jasmine-core/jasmine";
config.paths["jasmine-html"] = "bower_components/jasmine/lib/jasmine-core/jasmine-html";
config.paths["console-runner"] = "../node_modules/phantom-jasmine/lib/console-runner";
config.shim['jasmine-html'] = {
deps: ['jasmine'],
exports: 'jasmine'
};
require.config(config);
require([
"jquery",
"jasmine-html",
"jquery.browser"
], function($, jasmine) {
$.fx.off = true;
require([
"console-runner",
"pat-compat",
"../tests/specs/core/base",
"../tests/specs/core/jquery-ext",
"../tests/specs/core/parser",
"../tests/specs/core/store",
"../tests/specs/core/url",
"../tests/specs/core/utils",
"../tests/specs/lib/depends_parse",
"../tests/specs/lib/dependshandler",
"../tests/specs/lib/htmlparser",
"pat/ajax/tests",
"pat/auto-scale/tests",
"pat/auto-submit/tests",
"pat/auto-suggest/tests",
"pat/bumper/tests",
"pat/calendar/tests",
"pat/carousel/tests",
"pat/checked-flag/tests",
"pat/checklist/tests",
"pat/clone/tests",
"pat/collapsible/tests",
"pat/depends/tests",
"pat/equaliser/tests",
"pat/focus/tests",
"pat/image-crop/tests",
"pat/inject/tests",
"pat/legend/tests",
"pat/markdown/tests",
"pat/masonry/tests",
"pat/modal/tests",
"pat/scroll/tests",
"pat/slides/tests",
"pat/slideshow-builder/tests",
"pat/sortable/tests",
"pat/stacks/tests",
"pat/switch/tests",
"pat/tabs/tests",
"pat/toggle/tests",
"pat/tooltip/tests",
"pat/validation/tests",
"pat/zoom/tests"
], function() {
var jasmineEnv = jasmine.getEnv();
var reporter;
if (/PhantomJS/.test(navigator.userAgent)) {
reporter = new jasmine.ConsoleReporter();
window.console_reporter = reporter;
jasmineEnv.addReporter(reporter);
jasmineEnv.updateInterval = 0;
} else {
reporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter(reporter);
jasmineEnv.specFilter = function(spec) {
return reporter.specFilter(spec);
};
jasmineEnv.updateInterval = 0; // Make this more to see what's happening
}
jasmineEnv.execute();
});
}
);