You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests should be able to run by executing the npm run test command
Observed Behavior
The tests fail with the error
Uncaught exception in test/usps.ts
TypeError {
code: 'ERR_UNKNOWN_FILE_EXTENSION',
message: 'Unknown file extension ".ts" for /usps-webtools-promise/test/usps.ts',
}
This error repeats for all files.
Details
I was trying to author a pull-request that will add the newly required 'password' field to all interfaces but when I tried to run the tests they all failed. This seems to be due to new module loading standards in node 20 where it is unwilling to execute .ts files even when specifying --loader=tsx/esm. The TSX documentation mentions that it may need to change to --import=tsx/esm and while this change does cause it to report the error differently, the same error remains. I tried a bunch of different variations on this in the ava settings inside the package.json but could not find a workaround.
In the meanwhile, I might try installing node 18 to see if it still runs okay there, but it would be nice to be able to run the tests on the latest node LTS version.
The text was updated successfully, but these errors were encountered:
Expected Behavior
Tests should be able to run by executing the
npm run test
commandObserved Behavior
The tests fail with the error
This error repeats for all files.
Details
I was trying to author a pull-request that will add the newly required 'password' field to all interfaces but when I tried to run the tests they all failed. This seems to be due to new module loading standards in node 20 where it is unwilling to execute .ts files even when specifying
--loader=tsx/esm
. The TSX documentation mentions that it may need to change to--import=tsx/esm
and while this change does cause it to report the error differently, the same error remains. I tried a bunch of different variations on this in the ava settings inside the package.json but could not find a workaround.In the meanwhile, I might try installing node 18 to see if it still runs okay there, but it would be nice to be able to run the tests on the latest node LTS version.
The text was updated successfully, but these errors were encountered: