From 300e2021d378409862581dd10be85803f9b7485f Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 30 Apr 2022 07:35:43 -0600 Subject: [PATCH] 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" } }