Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed a bug where the first @import in friendlycode.css wasn't being …

…inlined.
  • Loading branch information...
commit fb5f22be1620273aa9abea28fbd60946c8594a3e 1 parent 9a3e790
@toolness toolness authored
Showing with 8 additions and 2 deletions.
  1. +2 −2 css/friendlycode.css
  2. +6 −0 test/node-tap/test-qunit.js
View
4 css/friendlycode.css
@@ -1,7 +1,7 @@
/*
* This stylesheet is only intended for development purposes,
- * due to the inefficiency of @import [1]. For production use, this
- * file should be a raw concatenation of all the @import rules below.
+ * due to the inefficiency of import [1]. For production use, this
+ * file should be a raw concatenation of all the import at-rules below.
*
* [1] http://www.stevesouders.com/blog/2009/04/09/dont-use-import/
*/
View
6 test/node-tap/test-qunit.js
@@ -49,6 +49,11 @@ test("unoptimized test suite works", function(t) {
runQUnitTests("/test/index.html", t);
});
+function ensureCssHasNoImports(t, builtCss) {
+ var css = fs.readFileSync(path.resolve(rootDir, builtCss), 'utf-8');
+ t.ok(!/@import/.test(css), builtCss + " has no @import rules");
+}
+
test("optimized build and test suite work", function(t) {
var optimize;
var builtJs = 'js/friendlycode-built.js';
@@ -62,6 +67,7 @@ test("optimized build and test suite work", function(t) {
t.equal(status, 0, "build-require.js should exit with no errors");
t.ok(exists(builtJs), builtJs + " was created");
t.ok(exists(builtCss), builtCss + " was created");
+ ensureCssHasNoImports(t, builtCss);
runQUnitTests("/test/index-optimized.html", t);
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.