Skip to content

Commit 9fb04e4

Browse files
committed
Core: Convert tests to new infrastructure
Ref #10119 Ref jquerygh-1528
1 parent f908a77 commit 9fb04e4

File tree

3 files changed

+14
-20
lines changed

3 files changed

+14
-20
lines changed

tests/unit/core/core.html

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,8 @@
44
<meta charset="utf-8">
55
<title>jQuery UI Core Test Suite</title>
66

7-
<script src="../../jquery.js"></script>
8-
<link rel="stylesheet" href="../../../external/qunit/qunit.css">
9-
<script src="../../../external/qunit/qunit.js"></script>
10-
<script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
11-
<script src="../testsuite.js"></script>
12-
<script>
13-
TestHelpers.loadResources({
14-
js: [ "ui/core.js" ]
15-
});
16-
</script>
17-
18-
<script src="core.js"></script>
19-
<script src="selector.js"></script>
20-
21-
<script src="../swarminject.js"></script>
7+
<script src="../../lib/css.js"></script>
8+
<script src="../../lib/bootstrap.js" data-modules="core selector"></script>
229
<style>
2310
.zindex {
2411
z-index: 100;

tests/unit/core/core.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
(function( $ ) {
1+
define( [
2+
"jquery",
3+
"lib/common",
4+
"ui/core"
5+
], function( $, common ) {
26

37
module( "core - jQuery extensions" );
48

5-
TestHelpers.testJshint( "core" );
9+
common.testJshint( "core" );
610

711
test( "innerWidth - getter", function() {
812
expect( 2 );
@@ -134,4 +138,4 @@ test( "uniqueId / removeUniqueId", function() {
134138
equal( el.attr( "id" ), null, "unique id has been removed from element" );
135139
});
136140

137-
})( jQuery );
141+
} );

tests/unit/core/selector.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
(function( $ ) {
1+
define( [
2+
"jquery",
3+
"ui/core"
4+
], function( $ ) {
25

36
module( "core - selectors" );
47

@@ -251,4 +254,4 @@ test( "tabbable - dimensionless parent with overflow", function() {
251254
isTabbable( "#dimensionlessParent", "input" );
252255
});
253256

254-
})( jQuery );
257+
} );

0 commit comments

Comments
 (0)