Permalink
Browse files

fixes combo warm cache test by adding a fixture that was somehow drop…

…ped, it is unclear to me why this has been passing with phantomjs
  • Loading branch information...
1 parent 2585b16 commit c660990fb15f98a160e18910bc86d55657a3dc3a @noahadams noahadams committed Mar 5, 2013
Showing with 11 additions and 4 deletions.
  1. +5 −0 tests/fixtures/push.js
  2. +6 −4 tests/index.html
View
5 tests/fixtures/push.js
@@ -0,0 +1,5 @@
+if(a.length == 1) {
+ a.push("b");
+} else {
+ a.push("d");
+}
View
10 tests/index.html
@@ -63,9 +63,9 @@ <h2 id="qunit-userAgent"></h2>
<textarea id="combineScripts-1">
<script>var a = ['a']</script>
- <script x-src="push.js#b"></script>
+ <script x-src="fixtures/push.js#b"></script>
<script>a.push('c')</script>
- <script x-src="push.js#d"></script>
+ <script x-src="fixtures/push.js#d"></script>
</textarea>
<textarea id="combineScripts-2">
@@ -195,10 +195,12 @@ <h2 id="qunit-userAgent"></h2>
}
}
, $scripts = $($('#combineScripts-1').text())
- , $result = $scripts.combineScripts()
+ , $result
, html = '';
httpCache.reset(cache);
+ $result = $scripts.combineScripts();
+
httpCache.save(function(err) {
if (err) {
return;
@@ -226,7 +228,7 @@ <h2 id="qunit-userAgent"></h2>
iframe.document.write(html);
function load() {
- equal(iframe.window.a.length, 4, 'a = [a, b, c , d]');
+ deepEqual(iframe.window.a, ['a', 'b', 'c', 'd'], 'a = [a, b, c , d]');
start();
}

0 comments on commit c660990

Please sign in to comment.