4
<title>require.js: Querystring Path Test</title>
5
<script type="text/javascript" src="../require.js"></script>
6
<script type="text/javascript" src="doh/runner.js"></script>
7
<script type="text/javascript" src="doh/_browserRunner.js"></script>
11
'one': 'one.js?some=thing'
15
require(['one', 'two'], function (one, two) {
19
function queryPath(t){
20
t.is('large', one.size);
21
t.is('small', two.size);
23
//Get all the script tags, make sure the one for
24
//'one' ends in 'one.js?some=thing' and the one
25
//for 'two' ends in 'two.js'
27
tags = document.getElementsByTagName('script'),
30
for (i = tags.length - 1; i > -1; i--) {
32
id = tag.getAttribute('data-requiremodule');
35
t.is(true, /one\.js\?some\=thing$/.test(src), 'no .js added');
37
} else if (id === 'two') {
38
t.is(true, /two\.js$/.test(src), 'has .js added');
53
<h1>require.js: Querystring Path Test</h1>
54
<p>Check console for messages</p>