Closed connorjclark closed 1 year ago
@searls I tried testing on windows but ran into too many issues.
yarn test:esm
uses bash.. nbd so I just ran NODE_OPTIONS=--loader=quibble node ./test/esm-lib/teenytest-proxy.js './test/esm-lib/*.test.{mjs,js}'
directly but that fails somewhere in teenytest-proxy.js ... which uses node require
to run a bash script ? NODE_OPTIONS=--loader=quibble sh node_modules/.bin/teenytest
and got:TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for C:\Users\cjamc\code\quibble\node_modules\teenytest\bin\teenytest
at new NodeError (internal/errors.js:322:7)
at defaultGetFormat (internal/modules/esm/get_format.js:71:15)
at getFormat (file:///C:/Users/cjamc/code/quibble/lib/quibble.mjs:65:12)
at Loader.getFormat (internal/modules/esm/loader.js:105:42)
at Loader.getModuleJob (internal/modules/esm/loader.js:243:31)
at async Loader.import (internal/modules/esm/loader.js:177:17)
at async Object.loadESM (internal/process/esm_loader.js:68:5) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
So I can't actually run the tests. Any advice on how to?
I gave it a spin with large number of tests that use testdouble, and do see some bugs still present so not ready to merge yet.
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:
Some resources perhaps needed to reference for a proper fix.
Managed to get the tests to run on windows. Added a script win:test:esm
. But does require one small change in a dep:
Thanks for continuing to work on this, I appreciate it. I won't be able to review for four or five days so feel free to keep pulling at this and polishing it
Hey @connorjclark, is there anything you need from me for next steps here? I'm back in town and technically own a Windows machine so I could try setting it up for win32 development if need be to verify manually
My plan at the moment is to first try it out on our Lighthouse unit tests on Window, but I've got a few more things to do first before I'll be able to try that. I'll comment here when I've verified it works on a big set of tests, so I'd hold off on your own verification until then.
Hi @connorjclark, this was fixed in v0.6.16 thanks to @webstech's help! https://github.com/testdouble/quibble/pull/89#issuecomment-1427049176
ref https://github.com/testdouble/testdouble.js/issues/491
Note: I am away from my windows machine so this is not yet verified. How can I configure the travis yml to run the tests on windows?