Skip to content

Commit 7670cdb

Browse files
committed
Move testsuite files around so that all external data providers are in the data directory
1 parent f1c65ce commit 7670cdb

14 files changed

+18
-6
lines changed

grunt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ grunt.initConfig({
1717
lint: {
1818
src: [ "jquery.simulate.js" ],
1919
grunt: "grunt.js",
20-
test: "test/unit/**"
20+
test: [ "test/*.js", "test/unit/*.js" ]
2121
},
2222

2323
jshint: (function() {
@@ -39,7 +39,7 @@ grunt.initConfig({
3939
return {
4040
src: parserc(),
4141
grunt: parserc(),
42-
test: parserc( "test/unit/" )
42+
test: parserc( "test/" )
4343
};
4444
})(),
4545

test/unit/.jshintrc renamed to test/.jshintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"module",
2222
"notEqual",
2323
"ok",
24+
"QUnit",
2425
"start",
2526
"stop",
2627
"strictEqual",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/jquery.js renamed to test/data/jquery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ for ( ; i < length; i++ ) {
1818
if ( version === "git" ) {
1919
url = "http://code.jquery.com/jquery-git.js";
2020
} else {
21-
url = "jquery-" + ( version || "1.7.2" ) + ".js";
21+
url = "data/jquery-" + ( version || "1.7.2" ) + ".js";
2222
}
2323

2424
document.write( "<script src='" + url + "'></script>" );

test/data/testinit.js

Whitespace-only changes.

test/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<title>jQuery-Simulate Test Suite</title>
66
<link rel="Stylesheet" media="screen" href="qunit/qunit/qunit.css" />
7-
<script src="data/testinit.js"></script>
8-
<script src="jquery.js"></script>
9-
<script src="../jquery.simulate.js"></script>
107
<script src="qunit/qunit/qunit.js"></script>
8+
<script src="testinit.js"></script>
9+
<script src="data/jquery.js"></script>
10+
<script src="../jquery.simulate.js"></script>
1111
<script src="unit/simulate.js"></script>
1212
<script src="data/swarminject.js"></script>
1313
</head>

test/testinit.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
(function() {
2+
3+
var reset = QUnit.reset;
4+
QUnit.reset = function() {
5+
// Ensure jQuery events and data on the fixture are properly removed
6+
jQuery("#qunit-fixture").empty();
7+
// Let QUnit reset the fixture
8+
reset.apply( this, arguments );
9+
};
10+
11+
})();

0 commit comments

Comments
 (0)