Browse files

Adding Nodeunit and QUnit reference comments to all init-generated un…

…it test .js files.
  • Loading branch information...
1 parent c7d707f commit 58f0ee7f433f45c8157354eb685bc17a3f72ed92 @cowboy cowboy committed Mar 30, 2012
View
20 tasks/init/commonjs/root/test/name_test.js
@@ -1,6 +1,26 @@
/*global require:true */
var {%= js_safe_name %} = require('../lib/{%= name %}.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
View
20 tasks/init/gruntplugin/root/test/name_test.js
@@ -1,5 +1,25 @@
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['{%= short_name %}'] = {
setUp: function(done) {
// setup here
View
19 tasks/init/jquery/root/test/name_test.js
@@ -3,6 +3,25 @@
/*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/
(function($) {
+ /*
+ ======== A Handy Little QUnit Reference ========
+ http://docs.jquery.com/QUnit
+
+ Test methods:
+ expect(numAssertions)
+ stop(increment)
+ start(decrement)
+ Test assertions:
+ ok(value, [message])
+ equal(actual, expected, [message])
+ notEqual(actual, expected, [message])
+ deepEqual(actual, expected, [message])
+ notDeepEqual(actual, expected, [message])
+ strictEqual(actual, expected, [message])
+ notStrictEqual(actual, expected, [message])
+ raises(block, [expected], [message])
+ */
+
module('jQuery#awesome', {
setup: function() {
this.elems = $('#qunit-fixture').children();
View
20 tasks/init/node/root/test/name_test.js
@@ -1,5 +1,25 @@
var {%= js_safe_name %} = require('../lib/{%= name %}.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

0 comments on commit 58f0ee7

Please sign in to comment.