How to test?
remy opened this issue · 4 comments
remy commented
@Richienb I've not looked at the code in a while and I see you've turned down the type="module"
path… which is fine :) but I've no idea how to test the code (I'm trying to write a test that fixes this issue some users still seeing).
I'm sure there's a flag missing somewhere:
$ yarn test
yarn run v1.22.10
$ node test.js
file:///Users/remy/dev/mit-license/test.js:3
import writeJsonFile from "write-json-file";
^^^^^^^^^^^^^
SyntaxError: The requested module 'write-json-file' does not provide an export named 'default'
at ModuleJob._instantiate (internal/modules/esm/module_job.js:121:21)
at async ModuleJob.run (internal/modules/esm/module_job.js:166:5)
at async Loader.import (internal/modules/esm/loader.js:178:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Richienb commented
remy commented
thought I had, but yep - on it.
remy commented
yeah, it's up to date.