Skip to content

Commit d245b0b

Browse files
committed
Move existing tests from tests/ to tests/unit/.
Preparation for adding functional tests.
1 parent 7b33e90 commit d245b0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+25
-17
lines changed

tests/README.md

Lines changed: 9 additions & 1 deletion

tests/intern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ define({
8383
},
8484

8585
// Non-functional test suite(s) to run in each browser
86-
suites: ["requirejs-dplugins/tests/all"],
86+
suites: ["requirejs-dplugins/tests/unit/all"],
8787

8888
// A regular expression matching URLs to files that should not be included in code coverage analysis
8989
excludeInstrumentation: /(?:requirejs(\/|\\)|dojo|tests|node_modules)/

tests/all.js renamed to tests/unit/all.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Listing of all the plugin tests
1+
// Listing of all the plugin unit tests
22
define([
33
"./css",
44
"./has",

tests/css.js renamed to tests/unit/css.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ define([
5050

5151
// Load two modules that both use requirejs-dplugins/css! to load test1.css
5252
cssRequire([
53-
"tests/resources/CssWidget1",
54-
"tests/resources/CssWidget2"
53+
"tests/unit/resources/CssWidget1",
54+
"tests/unit/resources/CssWidget2"
5555
], d.callback(function () {
5656
// test1.css should be automatically loaded (but just once, not twice) by the time
5757
// this require() call completes.
@@ -75,7 +75,7 @@ define([
7575
// Load another modules that uses requirejs-dplugins/css! to load the same test1.css,
7676
// just to triple check that the CSS doesn't get reloaded
7777
cssRequire([
78-
"tests/resources/CssWidget3"
78+
"tests/unit/resources/CssWidget3"
7979
], d.callback(function () {
8080
assert.strictEqual(getStyles().match(/test1/g).length, 1, "test1.css inserted once");
8181
}));
@@ -88,7 +88,7 @@ define([
8888

8989
// Load module with double dependency on test2.css
9090
cssRequire([
91-
"tests/resources/CssWidget4"
91+
"tests/unit/resources/CssWidget4"
9292
], d.callback(function () {
9393
// test2.css should be automatically loaded (but just once, not twice) by the time
9494
// this require() call completes.
@@ -105,15 +105,15 @@ define([
105105
config: {
106106
"css": {
107107
layersMap: {
108-
"tests/css/module5.css": "tests/css/layer.css"
108+
"tests/unit/css/module5.css": "tests/unit/css/layer.css"
109109
}
110110
}
111111
},
112112
context: "css"
113113
});
114114

115115
cssRequire([
116-
"css!tests/css/module5.css"
116+
"css!tests/unit/css/module5.css"
117117
], d.callback(function () {
118118
// layer.css should be loaded instead of module5.css
119119
assert.strictEqual(getStyles().match(/cssLayer/g).length, 1, "layer.css inserted once");
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)