Skip to content

Commit

Permalink
Add test for clean exit from node
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Duncalf committed May 5, 2022
1 parent b4d6033 commit 6767d91
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ x.x.x Release notes (yyyy-MM-dd)
### Internal
* Update token in integration test.
* Upgraded Realm Core from v11.12.0 to v11.13.0.
* Added a failing test case for Node.js scripts failing to exit cleanly ([#4556](https://github.com/realm/realm-js/pull/4556))

10.14.0 Release notes (2022-3-24)
=============================================================
Expand Down
13 changes: 13 additions & 0 deletions integration-tests/tests/src/node/clean-exit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { execSync } from "child_process";

describe("Clean exit for Node.js scripts", () => {
// Repro for https://github.com/realm/realm-js/issues/4535 - currently still failing
it.skip("exits cleanly when creating a new Realm.App", () => {
execSync(
`node -e 'const Realm = require("realm"); const app = new Realm.App({ id: "myapp-abcde" }); Realm.clearTestState();'`,
{
timeout: 5000,
},
);
});
});
1 change: 1 addition & 0 deletions integration-tests/tests/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
// NOTE: This file is only supposed to be imported from a Node.js environment

import "./analytics";
import "./clean-exit";

0 comments on commit 6767d91

Please sign in to comment.