mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
f37c2e51f3
jQuery source has been migrated in gh-4541 from AMD to ES modules. To maintain support for consumers of our AMD modules, this commits adds a task transpiling the ES modules sources in `src/` to AMD in `amd/`. A "Load with AMD" checkbox was also restored to the QUnit setup. Note that, contrary to jQuery 3.x, AMD files need to be generated via `grunt amd` or `grunt` as sources are not authored in ECMAScript modules. To achieve a similar no-compile experience during jQuery 4.x testing, use the new "Load as modules" checkbox which works in all supported browsers except for IE & Edge (the legacy, EdgeHTML-based one). Ref gh-4541 Closes gh-4554
48 lines
1.7 KiB
HTML
48 lines
1.7 KiB
HTML
<!doctype html>
|
|
<html lang="en" id="html">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>jQuery Test Suite</title>
|
|
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css" />
|
|
<link rel="stylesheet" href="data/testsuite.css" />
|
|
|
|
<!--
|
|
We have to use previous jQuery as helper to ensure testability with
|
|
ajax-free builds (and non-interference when changing ajax internals)
|
|
-->
|
|
<script src="data/jquery-1.9.1.js"></script>
|
|
|
|
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
<script src="../node_modules/sinon/pkg/sinon.js"></script>
|
|
<script src="../node_modules/native-promise-only/lib/npo.src.js"></script>
|
|
<script src="../node_modules/requirejs/require.js"></script>
|
|
<!-- See testinit for the list of tests -->
|
|
<script src="data/testinit.js"></script>
|
|
|
|
<!-- A script that includes jQuery min, dev, ES modules or AMD -->
|
|
<!-- Adds "basic" URL option, even to iframes -->
|
|
<!-- iframes will not load AMD as loading needs to be synchronous for some tests -->
|
|
<!-- Also executes the function above to load tests -->
|
|
<script src="jquery.js"></script>
|
|
|
|
<script>
|
|
// Load tests if they have not been loaded
|
|
// This is in a different script tag to ensure that
|
|
// jQuery is on the page when the testrunner executes
|
|
if ( !QUnit.urlParams.esmodules && !QUnit.urlParams.amd ) {
|
|
loadTests();
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body id="body">
|
|
<div id="qunit"></div>
|
|
|
|
<!-- Test HTML -->
|
|
<!-- this iframe is outside the #qunit-fixture so it won't waste time by constantly reloading; the tests are "safe" and clean up after themselves -->
|
|
<iframe id="loadediframe" name="loadediframe" style="display:none;" src="data/iframe.html"></iframe>
|
|
<div id="qunit-fixture"></div>
|
|
<script src="data/qunit-fixture.js"></script>
|
|
</body>
|
|
</html>
|