This commit is contained in:
Chris Rebert 2014-07-10 22:55:25 -07:00
Родитель 24299ecf6b
Коммит b96b1674af
2 изменённых файлов: 51 добавлений и 0 удалений

15
src/bootlint.js Normal file
Просмотреть файл

@ -0,0 +1,15 @@
/*!
* bootlint - https://github.com/cvrebert/bootlint
* Copyright (c) 2014 Christopher Rebert
* Licensed under the MIT license.
*/
(function(exports) {
'use strict';
exports.awesome = function() {
return 'awesome';
};
}(typeof exports === 'object' && exports || this));

36
test/bootlint_test.js Normal file
Просмотреть файл

@ -0,0 +1,36 @@
'use strict';
var bootlint = require('../src/bootlint.js');
/*
======== 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['awesome'] = {
setUp: function(done) {
// setup here
done();
},
'no args': function(test) {
test.expect(1);
// tests here
test.equal(bootlint.awesome(), 'awesome', 'should be awesome.');
test.done();
}
};