update core tests to use amd, fix misleading test

This commit is contained in:
John Bender 2011-12-21 07:58:11 -08:00 committed by scottjehl
parent 7e2ba55323
commit 6af53d6409
2 changed files with 16 additions and 8 deletions

View file

@ -143,7 +143,7 @@
test( "$.fn.getEncodedText should return the encoded value where $.fn.text doesn't", function() {
same( $("#encoded").text(), "foo>");
same( $("#encoded").getEncodedText(), "foo>");
same( $("#unencoded").getEncodedText(), "foo");
same( $("#unencoded").getEncodedText(), "var foo;");
});
test( "closestPageData returns the parent's page data", function() {

View file

@ -7,16 +7,24 @@
<script src="../../../js/jquery.js"></script>
<script src="../jquery.setNameSpace.js"></script>
<script src="../../../external/qunit.js"></script>
<script src="../../../js/"></script>
<!-- added explicitly for library reloading (see testHelper ) -->
<script src="../../jquery.testHelper.js"></script>
<script src="../../../external/qunit.js"></script>
<script src="../../../external/require.js"></script>
<script>
$.testHelper.asyncLoad([
[
"jquery.mobile.core"
],
[ "jquery.mobile.init" ],
[
"core",
"core_scroll"
]
]);
</script>
<link rel="stylesheet" href="../../../css/themes/default/" />
<link rel="stylesheet" href="../../../external/qunit.css"/>
<script src="core.js"></script>
<script src="core_scroll.js"></script>
<script src="../swarminject.js"></script>
</head>
<body>
@ -34,7 +42,7 @@
<div id="parent"></div>
<div id="dependent"></div>
<div id="encoded">foo&gt;</div>
<div id="unencoded"><script>foo</script></div>
<div id="unencoded"><script>var foo;</script></div>
<div id="parent-page" data-nstest-role="page">
<div id="page-child"></div>