Jest Tests on Linux machine failing becasue of Realm.Sync
See original GitHub issueHi I am having issues with Realm on my Linux machine when I try to run jest unit tests. All the tests fail with
● Test suite failed to run
Realm.Sync is not available. Note that the developer edition of the Node.JS SDK for Realm does not include sync on Linux.
at Function.get (node_modules/realm/lib/extensions.js:72:7)
at Object.<anonymous>.module.exports (node_modules/realm/lib/extensions.js:44:20)
at Object.<anonymous> (node_modules/realm/lib/index.js:95:24)
at Object.<anonymous> (src/realm/index.js:1:585)
I saw that the “problem” was introduced on the PR https://github.com/realm/realm-js/pull/925 referenced on the issue https://github.com/realm/realm-js/issues/923 The problem is that I am not using Sync at all. Should not this being thrown just in case of actual usage? Thanks a lot
Goals
Being able to run my unit-tests for a react-native project using realmjs on a machine running Linux
Expected results
The CI process to match what we have on the dev machine (all the tests passed)
Actual results
all the tests fail with this error
● Test suite failed to run
Realm.Sync is not available. Note that the developer edition of the Node.JS SDK for Realm does not include sync on Linux.
at Function.get (node_modules/realm/lib/extensions.js:72:7)
at Object.<anonymous>.module.exports (node_modules/realm/lib/extensions.js:44:20)
at Object.<anonymous> (node_modules/realm/lib/index.js:95:24)
at Object.<anonymous> (src/realm/index.js:1:585)
Steps to reproduce
- Get a Linux machine
- Make a react-native project including react and jest
- Use realm somewhere in your code base
- Run a test
Code sample that highlights the issue (full Xcode / Android Studio projects that we can compile ourselves are ideal)
No test code is using realm, just one single file
const realm = new Realm({path: 'app.realm', schema: [Some, Schema, Around, App]});
Version of Realm/Linux
from packages.json
"react": "16.0.0-alpha.6",
"react-native": "0.43.4",
"realm": "^1.2.0"
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Reroute realm network for jest test locally, error when call ...
First I reroute the routine that opening the realm connection so that when the code runs in the jest-test environment it will open...
Read more >Node.js v19.3.0 Documentation
Indicates the failure of an assertion. All errors thrown by the node:assert module will be instances of the AssertionError class. new assert.AssertionError( ...
Read more >realm - npm Package Health Analysis
You can connect your project's repository to Snyk to stay up to date on security alerts and receive automatic fix pull requests. #...
Read more >Npm install command failing with message "could not find ...
And the node_modules folder is not created. My computer setup: Windows 10 - Version 21H1 build 19043.1165 NodeJS / NPM - v16.6.1 /...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
there will be very soon
oh thank you very much for this change, I completely forgot that I had opened this issue. Is there a new version released of the npm package yet?