diff options
author | Zac Echola <zac.echola@gmail.com> | 2014-07-26 08:48:19 +0400 |
---|---|---|
committer | Zac Echola <zac.echola@gmail.com> | 2014-07-26 08:48:19 +0400 |
commit | f52415bdb2b1569bbfc5a09e1133d48a5cbd0c86 (patch) | |
tree | 22201d396add6b35c821b52c2cb9cceed2fa5c13 /test |
:seedling:
Diffstat (limited to 'test')
-rw-r--r-- | test/bootlint_test.js | 48 | ||||
-rw-r--r-- | test/expected/custom_options | 1 | ||||
-rw-r--r-- | test/expected/default_options | 1 | ||||
-rw-r--r-- | test/fixtures/123 | 1 | ||||
-rw-r--r-- | test/fixtures/testing | 1 |
5 files changed, 52 insertions, 0 deletions
diff --git a/test/bootlint_test.js b/test/bootlint_test.js new file mode 100644 index 0000000..f73f070 --- /dev/null +++ b/test/bootlint_test.js @@ -0,0 +1,48 @@ +'use strict'; + +var grunt = require('grunt'); + +/* + ======== A Handy Little Nodeunit Reference ======== + https://github.com/caolan/nodeunit + + Test methods: + test.expect(numAssertions) + test.done() + Test assertions: + test.ok(value, [message]) + test.equal(actual, expected, [message]) + test.notEqual(actual, expected, [message]) + test.deepEqual(actual, expected, [message]) + test.notDeepEqual(actual, expected, [message]) + test.strictEqual(actual, expected, [message]) + test.notStrictEqual(actual, expected, [message]) + test.throws(block, [error], [message]) + test.doesNotThrow(block, [error], [message]) + test.ifError(value) +*/ + +exports.bootlint = { + setUp: function(done) { + // setup here if necessary + done(); + }, + default_options: function(test) { + test.expect(1); + + var actual = grunt.file.read('tmp/default_options'); + var expected = grunt.file.read('test/expected/default_options'); + test.equal(actual, expected, 'should describe what the default behavior is.'); + + test.done(); + }, + custom_options: function(test) { + test.expect(1); + + var actual = grunt.file.read('tmp/custom_options'); + var expected = grunt.file.read('test/expected/custom_options'); + test.equal(actual, expected, 'should describe what the custom option(s) behavior is.'); + + test.done(); + }, +}; diff --git a/test/expected/custom_options b/test/expected/custom_options new file mode 100644 index 0000000..e597128 --- /dev/null +++ b/test/expected/custom_options @@ -0,0 +1 @@ +Testing: 1 2 3 !!!
\ No newline at end of file diff --git a/test/expected/default_options b/test/expected/default_options new file mode 100644 index 0000000..5f8b72f --- /dev/null +++ b/test/expected/default_options @@ -0,0 +1 @@ +Testing, 1 2 3.
\ No newline at end of file diff --git a/test/fixtures/123 b/test/fixtures/123 new file mode 100644 index 0000000..703ca85 --- /dev/null +++ b/test/fixtures/123 @@ -0,0 +1 @@ +1 2 3
\ No newline at end of file diff --git a/test/fixtures/testing b/test/fixtures/testing new file mode 100644 index 0000000..0a90125 --- /dev/null +++ b/test/fixtures/testing @@ -0,0 +1 @@ +Testing
\ No newline at end of file |