diff options
author | Zac Echola <zac.echola@so.mnscu.edu> | 2014-08-19 23:02:14 +0400 |
---|---|---|
committer | Zac Echola <zac.echola@so.mnscu.edu> | 2014-08-19 23:02:14 +0400 |
commit | a4320a1c559b1720dfcae46703f260780cc9a237 (patch) | |
tree | 9c5738124e24cd74c5996eb7ac0eae8134aa056c /test | |
parent | ae31bb28f74b306437ca6cb34662935c3910434e (diff) |
Adding error relaxation.
Closes #4
Diffstat (limited to 'test')
-rw-r--r-- | test/bootlint_test.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/bootlint_test.js b/test/bootlint_test.js index 3db1ea0..d1a136b 100644 --- a/test/bootlint_test.js +++ b/test/bootlint_test.js @@ -29,11 +29,13 @@ exports.bootlint = { done(); }, default_options: function(test) { - test.expect(3); + test.expect(4); grunt.util.spawn({ grunt: true, args: ['bootlint:default_options', '--no-color'], }, function(err, result) { + test.ok(result.stdout.indexOf("Validation started for") >= 0, + 'Should print start msg'); test.ok(result.stdout.indexOf("test/fixtures/missing-doctype.html") >= 0, 'Should print file path'); test.ok(result.stdout.indexOf("Document is missing a DOCTYPE declaration") >= 0, @@ -49,21 +51,23 @@ exports.bootlint = { grunt: true, args: ['bootlint:custom_options', '--no-color'], }, function(err, result) { - test.ok(result.stdout.indexOf("test/fixtures/missing-doctype.html") === -1, - 'Should not print this file path'); test.ok(result.stdout.indexOf("Document is missing a DOCTYPE declaration") === -1, 'Should not warn about missing a DOCTYPE'); + test.ok(result.stdout.indexOf("is OK") >= 0, + 'Should print filepath is OK!'); test.ok(result.stdout.indexOf("1 lint errors found") >= 0, 'Should print correct number of lint errors'); test.done(); }); }, pass: function(test) { - test.expect(1); + test.expect(2); grunt.util.spawn({ grunt: true, args: ['bootlint:pass', '--no-color'], }, function(err, result) { + test.ok(result.stdout.indexOf("is OK") >= 0, + 'Should print filepath is OK!'); test.ok(result.stdout.indexOf("All Done!") >= 0, 'Should print All Done! message'); test.done(); |