-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node integration test enviroment #5241
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small things, but nothing holding this back. LGTM
require("@realm/integration-tests"); | ||
// Add the integration test suite | ||
await import("@realm/integration-tests"); | ||
console.log("integration tests loaded"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed console.logs
here and in the updated mocha-client
. Do we want to keep those in, or were they just for testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah - good catch. They need to go 🙂
import "./utils/import-app.test"; | ||
import "./utils/chai-plugin.test"; | ||
import "./utils/import-app.test.ts"; | ||
import "./utils/chai-plugin.test.ts"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to detect these extensions automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I played around with it. It think it gets confused about the .test
part of the extension 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting this issue as well when I was getting the react-native tests to run again, but in a different section. Wasn't really able to resolve it. Very odd.
* Adding mocha-reporter and node testenv to NPM WS * Making the Node tests and environment ESM friendly * Upgrading to the latest Mocha Remote * Cleaned up some console.logs
* Adding mocha-reporter and node testenv to NPM WS * Making the Node tests and environment ESM friendly * Upgrading to the latest Mocha Remote * Cleaned up some console.logs
What, How & Why?
This fixes up the Node.js integration test environment, making it ESM friendly in the process.
I had to temporarily skip the Node.js specific "analytics" tests, as they need to be migrated off the non-esm Node.js APIs.
☑️ ToDos
Compatibility
label is updated or copied from previous entryCOMPATIBILITY.md
package.json
s (if updating internal packages)Breaking
label has been applied or is not necessary