Skip to content

Commit 739f9b3

Browse files
committed
Position: Convert tests to new infrastructure
Ref #10119 Ref gh-1528
1 parent f2ca8f9 commit 739f9b3

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

tests/unit/position/position.html

+2-14
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,8 @@
44
<meta charset="utf-8">
55
<title>jQuery UI Position 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/position.js" ]
15-
});
16-
</script>
17-
18-
<script src="position_core.js"></script>
19-
20-
<script src="../swarminject.js"></script>
7+
<script src="../../lib/css.js"></script>
8+
<script src="../../lib/bootstrap.js" data-modules="position_core"></script>
219
</head>
2210
<body>
2311
<div id="qunit" style="position:relative; z-index:2;"></div>

tests/unit/position/position_core.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
(function( $ ) {
1+
define( [
2+
"jquery",
3+
"lib/common",
4+
"ui/position"
5+
], function( $, common ) {
26

37
var win = $( window ),
48
scrollTopSupport = function() {
@@ -16,7 +20,7 @@ module( "position", {
1620
}
1721
});
1822

19-
TestHelpers.testJshint( "position" );
23+
common.testJshint( "position" );
2024

2125
test( "my, at, of", function() {
2226
expect( 4 );
@@ -763,4 +767,4 @@ test( "bug #8710: flip if flipped position fits more", function() {
763767
}, "no flip - top fits less" );
764768
});
765769

766-
}( jQuery ) );
770+
} );

0 commit comments

Comments
 (0)