Skip to content

Commit

Permalink
Remove unused variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Feb 26, 2015
1 parent 52fc302 commit e274386
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
7 changes: 4 additions & 3 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"boss": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"node": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"node": true
"unused": true
}
13 changes: 6 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = function(grunt) {
nodeunit: {
tests: ['test/*_test.js'],
},

// clean tmp dir
clean: {
tests: ['tmp']
Expand All @@ -54,8 +54,7 @@ module.exports = function(grunt) {
// Tests nodeunit with tap reporter
grunt.registerTask('test-tap', function(which) {
var test = path.join('test', 'fixtures', which + '.js');
var tap = path.join('tmp', which + '.js.tap');


if (grunt.file.exists(test)) {
grunt.config('nodeunit.tests', test);
}
Expand All @@ -65,12 +64,12 @@ module.exports = function(grunt) {
grunt.task.run('clean');
grunt.task.run('nodeunit');
});

// Tests nodeunit with tap reporter and output saved to a file
grunt.registerTask('test-tap-out', function(which) {
var test = path.join('test', 'fixtures', which + '.js');
var tap = path.join('tmp', which + '.js.tap');

if (grunt.file.exists(test)) {
grunt.config('nodeunit.tests', test);
}
Expand All @@ -86,7 +85,7 @@ module.exports = function(grunt) {
grunt.registerTask('test-junit', function(which) {
var test = path.join('test', 'fixtures', which + '.js');
var outDir = path.join('tmp', which + '.junit');

if (grunt.file.exists(test)) {
grunt.config('nodeunit.tests', test);
}
Expand All @@ -102,7 +101,7 @@ module.exports = function(grunt) {
grunt.registerTask('test-minimal', function(which) {
var test = path.join('test', 'fixtures', which + '.js');
var out = path.join('tmp', which + '.js.out');

if (grunt.file.exists(test)) {
grunt.config('nodeunit.tests', test);
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-internal": "^0.4.6",
"grunt-contrib-internal": "^0.4.12",
"grunt-contrib-jshint": "^0.11.0",
"tap": "^0.5.0"
"tap": "^0.7.0"
},
"peerDependencies": {
"grunt": ">=0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion tasks/nodeunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ module.exports = function(grunt) {
// Keep track of failed assertions for pretty-printing.
var failedAssertions = [];
function logFailedAssertions() {
var assertion, stack;
var assertion;
// Print each assertion error + stack.
while (assertion = failedAssertions.shift()) {
betterErrors(assertion);
Expand Down
10 changes: 5 additions & 5 deletions test/nodeunit_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports.nodeunit = {
grunt.util.spawn({
grunt: true,
args: ['test-tap:fail', '--no-color'],
}, function(err, result, code) {
}, function(err, result) {
// stdout message
test.ok(result.stdout.indexOf('# fail - fail') !== -1, 'First test should fail');
test.ok(result.stdout.indexOf('not ok 1 this value should be truthy') !== -1, 'First test failure notice');
Expand All @@ -43,8 +43,8 @@ exports.nodeunit = {
grunt.util.spawn({
grunt: true,
args: ['test-tap-out:fail', '--no-color'],
}, function(err, result, code) {
// stdout message
}, function(err, result) {
// stdout message
test.ok(result.stdout.indexOf('fail.js.tap" created') !== -1, 'File creation notice should be displayed.');

// verify parts of the fail.js.tap contents against ours
Expand All @@ -66,7 +66,7 @@ exports.nodeunit = {
grunt.util.spawn({
grunt: true,
args: ['test-junit:fail', '--no-color'],
}, function(err, result,code) {
}, function(err, result) {
// verify the junit directory exists
var junitDir = path.join('tmp', 'fail.junit');
var junitFile = path.join(junitDir, 'fail.js.xml');
Expand All @@ -85,7 +85,7 @@ exports.nodeunit = {
grunt.util.spawn({
grunt: true,
args: ['test-minimal:fail', '--no-color'],
}, function(err, result, code) {
}, function(err, result) {
// stdout message
test.ok(result.stdout.indexOf('fail.js.out" created') !== -1, 'File creation notice should be displayed.');

Expand Down

0 comments on commit e274386

Please sign in to comment.