Closed XhmikosR closed 4 years ago
@Herst @Johann-S how difficult would be to switch to another testing framework?
I'll try one more time in the next days but I doubt anything will change, so we might need to start looking into switching to a more maintained framework.
how difficult would be to switch to another testing framework?
Depends on the framework really… Generally I am all in favour of switching to something more maintained.
I think it's a good move to move away from nodeunit
there are a lot of maintained framework
Actually, maybe we are doing something wrong in the cli test? I mean, terser is using this package and they do test Node.js 12.x.
Also note that the CLI tests fail on GitHub Actions CI. I think we are doing something wrong there.
cli_test
TypeError: process.stdin.setEncoding is not a function
✔ bootlint - Disable tags
at /home/runner/work/bootlint/bootlint/src/cli.js:55:27
at Promise._execute (/home/runner/work/bootlint/bootlint/node_modules/bluebird/js/release/debuggability.js:313:9)
at Promise._resolveFromExecutor (/home/runner/work/bootlint/bootlint/node_modules/bluebird/js/release/promise.js:488:18)
at new Promise (/home/runner/work/bootlint/bootlint/node_modules/bluebird/js/release/promise.js:79:10)
at handleStdin (/home/runner/work/bootlint/bootlint/src/cli.js:48:16)
at /home/runner/work/bootlint/bootlint/src/cli.js:89:44
at Array.forEach (<anonymous>)
at module.exports (/home/runner/work/bootlint/bootlint/src/cli.js:88:18)
at Object.Disable tags (/home/runner/work/bootlint/bootlint/test/cli_test.js:84:9)
at /home/runner/work/bootlint/bootlint/node_modules/nodeunit/lib/core.js:232:20
at /home/runner/work/bootlint/bootlint/node_modules/nodeunit/deps/async.js:168:13
at /home/runner/work/bootlint/bootlint/node_modules/nodeunit/deps/async.js:131:25
at /home/runner/work/bootlint/bootlint/node_modules/nodeunit/deps/async.js:165:17
at /home/runner/work/bootlint/bootlint/node_modules/nodeunit/deps/async.js:463:34
at Object.setUp (/home/runner/work/bootlint/bootlint/test/cli_test.js:48:9)
at /home/runner/work/bootlint/bootlint/node_modules/nodeunit/lib/core.js:260:35
So, it seems the issue we have with Node.js 12.x and also with GitHub Actions CI stems from these lines:
If I remove them, then it works.
I'm not sure what is the proper way to replace this functionality. @tclindner do you have any ideas?
NVM, I finally figured it out. It's a bug in rewire, see https://github.com/jhnns/rewire/pull/167. I will try switching to a fork we control until this is fixed upstream.
Apparently this is broken due to source-map-support.
Which means that bootlint itself should work fine on Node.js 12 since these are devDependencies. But it'd be nice if we could sort this out and actually test on Node.js 12 ourselves.