From 37c004be0a9959fb2bbd025025a4e7647610939c Mon Sep 17 00:00:00 2001 From: Christopher-Johnson Date: Wed, 20 Apr 2022 03:14:52 -0600 Subject: [PATCH 1/7] Upgrade dependency. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 33bd025be..db4014c9b 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ }, "dependencies": { "ejs": "^2.5.2", - "tap": "^12.0.1" + "tap": "^16.0.1" }, "scripts": { "test": "node ./bin/nodeunit" From cb11ed35a423eef45881bea7b3b7653107e25c12 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 30 Apr 2022 06:45:02 -0600 Subject: [PATCH 2/7] Clean up console output --- lib/reporters/index.js | 4 ++-- package.json | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/reporters/index.js b/lib/reporters/index.js index 10eff3c49..f5ce4a303 100644 --- a/lib/reporters/index.js +++ b/lib/reporters/index.js @@ -11,14 +11,14 @@ try { } module.exports = { - 'junit': require('./junit'), + // 'junit': require('./junit'), 'default': require('./default'), 'skip_passed': require('./skip_passed'), 'minimal': require('./minimal'), 'html': require('./html'), 'eclipse': require('./eclipse'), 'machineout': require('./machineout'), - 'tap': tap, + // 'tap': tap, 'nested': require('./nested'), 'verbose' : require('./verbose'), 'lcov' : require('./lcov') diff --git a/package.json b/package.json index db4014c9b..6851e80ff 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,18 @@ { "name": "nodeunit", - "version": "0.11.3", + "version": "1.0.0", "description": "Easy unit testing for node.js and the browser.", "maintainers": [ { - "name": "Caolan McMahon", - "web": "https://github.com/caolan" + "name": "Chris Johnson", + "web": "https://github.com/chrisjohn404" } ], "contributors": [ + { + "name": "Caolan McMahon", + "web": "https://github.com/caolan" + }, { "name": "Romain Beauxis", "web": "https://github.com/toots" @@ -78,7 +82,7 @@ "bin": { "nodeunit": "./bin/nodeunit" }, - "dependencies": { + "depDependencies": { "ejs": "^2.5.2", "tap": "^16.0.1" }, From b8be028f3d9ec9b7e74880dda0caae1dadc3aa82 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 30 Apr 2022 06:45:02 -0600 Subject: [PATCH 3/7] Improved long term stability. --- lib/reporters/index.js | 4 ++-- package.json | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/reporters/index.js b/lib/reporters/index.js index 10eff3c49..f5ce4a303 100644 --- a/lib/reporters/index.js +++ b/lib/reporters/index.js @@ -11,14 +11,14 @@ try { } module.exports = { - 'junit': require('./junit'), + // 'junit': require('./junit'), 'default': require('./default'), 'skip_passed': require('./skip_passed'), 'minimal': require('./minimal'), 'html': require('./html'), 'eclipse': require('./eclipse'), 'machineout': require('./machineout'), - 'tap': tap, + // 'tap': tap, 'nested': require('./nested'), 'verbose' : require('./verbose'), 'lcov' : require('./lcov') diff --git a/package.json b/package.json index db4014c9b..6851e80ff 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,18 @@ { "name": "nodeunit", - "version": "0.11.3", + "version": "1.0.0", "description": "Easy unit testing for node.js and the browser.", "maintainers": [ { - "name": "Caolan McMahon", - "web": "https://github.com/caolan" + "name": "Chris Johnson", + "web": "https://github.com/chrisjohn404" } ], "contributors": [ + { + "name": "Caolan McMahon", + "web": "https://github.com/caolan" + }, { "name": "Romain Beauxis", "web": "https://github.com/toots" @@ -78,7 +82,7 @@ "bin": { "nodeunit": "./bin/nodeunit" }, - "dependencies": { + "depDependencies": { "ejs": "^2.5.2", "tap": "^16.0.1" }, From 3becf9a9b4d4d66d54f61d98a8ad4fa5c0175a4e Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 30 Apr 2022 07:04:25 -0600 Subject: [PATCH 4/7] Added big mention for @caolan. --- README.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index ff9f28e49..385600af2 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,7 @@ Simple syntax, powerful tools. Nodeunit provides easy async unit testing for node.js and the browser. -DEPRECATED PROJECT ------ - -The project is very stale. We've kept it working on new versions of node, and sometimes merged small PRs that help teams relying on nodeunit. - -Nodeunit was the arguably first testing framework developed for node. It was very useful at the time, but there's an overwhelming number -of other worthwhile testing solutions out there that are actively maintained. tap, ava, tape, mocha, jasmine, jest, ... the list goes on and on. - -If Nodeunit were truly bringing some different philosophy to the testing scene I'd say yes effort should be made to shore up it's development, -but given how many other great options there are out there, a benefit of letting it atrophy is it's one less choice people have to make when -choosing a testing solution. *You are strongly encouraged to check out other more modern testing options.* - +Nodeunit was the arguably first testing framework developed for node. Features -------- @@ -28,12 +17,13 @@ Features * Works with node.js and in the browser * Helps you avoid common pitfalls when testing asynchronous code * Easy to add test cases with setUp and tearDown functions if you wish -* Flexible reporters for custom output, built-in support for HTML and jUnit XML +* Flexible reporters for custom output, built-in support for HTML * Allows the use of mocks and stubs Contributors ------------ +* [caolan](https://github.com/caolan) * [alexgorbatchev](https://github.com/alexgorbatchev) * [alexkwolfe](https://github.com/alexkwolfe) * [azatoth](https://github.com/azatoth) @@ -367,8 +357,6 @@ Built-in Test Reporters * __default__ - The standard reporter seen in the nodeunit screenshots * __minimal__ - Pretty, minimal output, shows errors and progress only * __html__ - Outputs a HTML report to stdout -* __junit__ - Creates jUnit compatible XML reports, which can be used with - continuous integration tools such as [Hudson](http://hudson-ci.org/). * __machineout__ - Simple reporter for machine analysis. There is [nodeunit.vim](https://github.com/lambdalisue/nodeunit.vim) which is useful for TDD on VIM. From 300e2021d378409862581dd10be85803f9b7485f Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 30 Apr 2022 07:35:43 -0600 Subject: [PATCH 5/7] Switched to template-literal to address issue #346 --- README.md | 2 +- lib/reporters/index.js | 15 ++------------- lib/reporters/junit.js | 3 ++- package.json | 3 +++ 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 385600af2..04fa76215 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Features * Works with node.js and in the browser * Helps you avoid common pitfalls when testing asynchronous code * Easy to add test cases with setUp and tearDown functions if you wish -* Flexible reporters for custom output, built-in support for HTML +* Flexible reporters for custom output, built-in support for HTML and jUnit XML * Allows the use of mocks and stubs Contributors diff --git a/lib/reporters/index.js b/lib/reporters/index.js index f5ce4a303..c7a74db12 100644 --- a/lib/reporters/index.js +++ b/lib/reporters/index.js @@ -1,24 +1,13 @@ -// This is a hack to make browserify skip tap -var tap; -try { - tap = require('./' + 'tap'); -} catch (ex) { - tap = { - run: function() { - throw new Error('Sorry, tap reporter not available'); - } - }; -} module.exports = { - // 'junit': require('./junit'), + 'junit': require('./junit'), 'default': require('./default'), 'skip_passed': require('./skip_passed'), 'minimal': require('./minimal'), 'html': require('./html'), 'eclipse': require('./eclipse'), 'machineout': require('./machineout'), - // 'tap': tap, + // 'tap': require('./tap'), 'nested': require('./nested'), 'verbose' : require('./verbose'), 'lcov' : require('./lcov') diff --git a/lib/reporters/junit.js b/lib/reporters/junit.js index 079653342..a33ef3771 100644 --- a/lib/reporters/junit.js +++ b/lib/reporters/junit.js @@ -15,7 +15,8 @@ var nodeunit = require('../nodeunit'), async = require('../../deps/async'), AssertionError = require('../assert').AssertionError, child_process = require('child_process'), - ejs = require('ejs'); + // ejs = require('ejs'); + ejs = require('template-literal'); /** diff --git a/package.json b/package.json index 6851e80ff..7efe9dc59 100644 --- a/package.json +++ b/package.json @@ -88,5 +88,8 @@ }, "scripts": { "test": "node ./bin/nodeunit" + }, + "dependencies": { + "template-literal": "^1.0.4" } } From 9cccff6cd87130bb55fb56b224c1460e2b071a4c Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 30 Apr 2022 08:10:33 -0600 Subject: [PATCH 6/7] Changed homepage and repo link. --- .gitignore | 2 ++ package.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1e3b95d4e..0af0e86d9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ stamp-build gmon.out v8.log .DS_Store + +package-lock.json \ No newline at end of file diff --git a/package.json b/package.json index 7efe9dc59..21c00b0da 100644 --- a/package.json +++ b/package.json @@ -64,14 +64,14 @@ ], "repository": { "type": "git", - "url": "http://github.com/caolan/nodeunit.git" + "url": "http://github.com/chrisjohn404/nodeunit.git" }, "devDependencies": { "should": ">=11.1.0", "uglify-js": ">=2.7.3" }, "bugs": { - "url": "http://github.com/caolan/nodeunit/issues" + "url": "http://github.com/chrisjohn404/nodeunit/issues" }, "license": "MIT", "directories": { From 530a38628da798b69a26631d148c1cd33331bc87 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 30 Apr 2022 08:13:08 -0600 Subject: [PATCH 7/7] Actual change of repo link. --- .gitignore | 1 + package.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1e3b95d4e..8ca6ad58b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ stamp-build gmon.out v8.log .DS_Store +package-lock.json \ No newline at end of file diff --git a/package.json b/package.json index 7efe9dc59..21c00b0da 100644 --- a/package.json +++ b/package.json @@ -64,14 +64,14 @@ ], "repository": { "type": "git", - "url": "http://github.com/caolan/nodeunit.git" + "url": "http://github.com/chrisjohn404/nodeunit.git" }, "devDependencies": { "should": ">=11.1.0", "uglify-js": ">=2.7.3" }, "bugs": { - "url": "http://github.com/caolan/nodeunit/issues" + "url": "http://github.com/chrisjohn404/nodeunit/issues" }, "license": "MIT", "directories": {