Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add some simple tests

  • Loading branch information...
commit f3ffc8a54837b9231b321a8fe5dd6eca2811aeaa 1 parent 7abaf3e
@vanetix authored
View
7 test/expected/cats.css
@@ -0,0 +1,7 @@
+body {
+ background: url('../assets/cat1.3a5521.jpg');
+}
+
+.cat-rap {
+ background: url('../assets/unknowncat.jpg');
+}
View
14 test/expected/cats.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+ <title>Crazy cat test</title>
+</head>
+<body>
+
+ <div class="cat-rap">
+ <img src="../assets/cat1.3a5521.jpg">
+ <img src="../assets/cat2.5cedc3.jpg">
+ <img src="../assets/cat3.b998a9.jpg">
+ </div>
+
+</body>
+</html>
View
12 test/index.js
@@ -2,7 +2,17 @@ var grunt = require('grunt');
exports.mapper = {
basic: function(test) {
- test.expect(1);
+ var actual, expected;
+
+ test.expect(2);
+
+ actual = grunt.file.read('tmp/cats.html');
+ expected = grunt.file.read('test/expected/cats.html');
+ test.equal(actual, expected, 'should correctly map html assets');
+
+ actual = grunt.file.read('tmp/cats.css');
+ expected = grunt.file.read('test/expected/cats.css');
+ test.equal(actual, expected, 'should correctly map css assets');
test.done();
}
Please sign in to comment.
Something went wrong with that request. Please try again.