Commit Graph

467 Commits

Author SHA1 Message Date
Yavor Georgiev db8ebd9333 Node.js Win32 support (#864)
* Remove the windows install check

* Node.js Win32 support

* Bring back the `REALM_HAVE_CONFIG` definition

* Download core for Windows when building

* Implement cross-platform node platform.cpp with libuv

* wip

* Make jasmine run quicker

https://github.com/jasmine/jasmine/issues/1204

* Wait for worker process to close in AsyncTests

* Cross-platform paths in tests

* Normalize path separator for forward slash on Windows

* MSVC exception voodoo

* cross-platform uv_cwd

* fix linux build

* make the prepublish script cross-platform

* Disable encryption tests on windows

* ignore vendor/realm-node

* jenkinsfile work

* Only run the prepublish script for publish and pack

* Jenkinsfile work

* Include gyp files in package

* rewrite default_realm_file_directory()

* fix React Native Android build

* delete all realm artifacts in remove_realm_files_from_directory

* bring back build environment variables

* node-pre-gyp windows

* Update CHANGELOG.md
2017-03-07 23:24:30 +01:00
Yavor Georgiev b93cfaf909 Temporary disable realmjs target on CI (#895)
* Temporary disable realmjs target on CI

It's broken because it doesn't support the node-fetch module. Let's disable it for now.

* Temporarily disable Android tests

They need an Object Server to talk to on CI

* Disable test assertion
2017-03-07 17:41:19 +01:00
Radu Tutueanu 833baa2118 Increase timeouts to avoid spurious failures 2017-02-09 12:11:31 +01:00
Radu Tutueanu be584856eb Increase timeout to 3s 2017-02-08 16:35:36 +01:00
Radu Tutueanu f19fd3e5dd Increase bind timeout 2017-02-08 13:52:26 +01:00
Yavor Georgiev 7c1dab7079 Propagate token refresh errors to the session error handler (#843)
* Get a session’s error handler

* Change the signature of all methods to add the callee

* Deserialize rpc callbacks

* Expose the session error handle on its config property

* When a token refresh error occurs and there is a session error handler

propagate the error to the handler
2017-02-07 11:01:26 +01:00
Yavor Georgiev 0c6000a733 Enable running android sync tests on macOS (#834)
* start ROS and forward ports when running android tests on macOS

* rework AuthError so JSC likes it
2017-02-02 02:41:27 +01:00
Yavor Georgiev b2da398559 Fix token refresh and session bugs in chrome debugging (#831) 2017-02-01 23:44:56 +01:00
Yavor Georgiev 9d1d970b1f Sync Session API (#825)
* Add Session class and expose it to JS

* Add error property on the sync config object for the event handler

* tests

* refactor access token refresh

* chrome debugging
2017-02-01 14:18:59 +01:00
Yavor Georgiev 408f5588f8 Add Permissions models and User Management Realm API (#824)
* Add Permissions models and User Management Realm API

* docs and changelog

* fix bad merge

* add test

* fix jsdoc annotation

* rename permissions to management schema
2017-01-31 22:56:09 +01:00
Kristian Dupont 0c9c5ac407 Add missing chrome debugging apis for Sync.User (#801)
* Add user tests

* Add Sync member to Realm

* Add a simple test for addListener

* Introduce browser User class

* Introduce Sync.User proxy

* Fix User.all

* Add User.logout

* Remove some console.log statements

* Update rpc.cpp from tests-folder

* Use user.current from user-methods, not cpp

* remove user.current from two missing places

* Start server in realmjs and react tests

* Add user tests

* Add Sync member to Realm

* Add a simple test for addListener

* Introduce browser User class

* Introduce Sync.User proxy

* Fix User.all

* Add User.logout

* Remove some console.log statements

* Update rpc.cpp from tests-folder

* Use user.current from user-methods, not cpp

* remove user.current from two missing places

* Start server in realmjs and react tests

* Replace needle with node-fetch

* Make AuthError work in the browser

* Allow for persistent callbacks

* Expose _authenticateRealm to native

* Use clear_test_state in roc

* Streamline test inclusion

* Fix login tests

* Promisify testLogin()

* Disable AsyncTests for now

* Mode jasmine timeout to spec/unit_tests.js

* Avoid use of global for fetch module

* Only include user-tests is sync is enabled

* Skip ROS for android tests

* Add some comments about persistent callbacks

* Fix results-test

* Run async-tests in node

* Add a comment about (user object)

* Cache all users in User.current and return promises in fetch

* node_require async-tests so RN doesn't try and package them

* Add missing parenthesis
2017-01-31 14:07:29 +01:00
Yavor Georgiev 12bde1ed35 Improve CI builds relying on Chrome (#796)
* Use ES6 Proxies to implement collections in the Chrome debugger

* rework realm-test-names event

* move React stuff on the CPH mac mini

* use node with npm3

* remove debugging aid code
2017-01-11 18:22:41 +01:00
Yavor Georgiev 6b07937c8b Upgrade react-test-app to RN 0.40 (#784)
* Upgrade react-test-app to RN 0.40.

* Give the test harness enough time to subscribe

to the `realm-test-names` event

* Disable parallel builds in the test app

http://stackoverflow.com/questions/41477241/react-native-xcode-upgrade-and-now-rctconvert-h-not-found

* Update ReactExample to RN 0.40.0
2017-01-10 14:00:23 +01:00
Kristian Dupont bd8a27b963 Improve error message for typeerrors (#785)
* Add a test

* Catch TypeErrorException

* Make exception asserts check error type

* Remove commented-out testcase and check for error type

* Test for Error, not TypeError
2017-01-10 13:41:56 +01:00
Kristian Dupont fa1f22ddc2 Fix constructor init (#774)
* Update test app to RN 0.39.0

* Fix getContext in index.js

* Add dependency on invariant

* Add some comments to getContext

* Make invariant a devdependency rather than a dependency
2017-01-06 14:30:32 +01:00
Mark Rowe 9d858d0329 Update to object store master to pick up the fix for the global notifier. (#778) 2017-01-05 11:56:11 +01:00
Emanuele Zattin 952b3f719b Fix Jenkins builds by rewriting the symlink 2017-01-03 11:32:30 +01:00
Kristian Dupont 4dc0403c58 Make eslint happy 2016-12-29 10:53:51 +01:00
Nabil Hachicha 914866beff Nh/fix 753 (#755)
* Fix Android compilation (Using  EPOLL commit helper)

* Fixe Symbol.iterator on Android

* Fixing testSchema test for Release
2016-12-28 17:16:37 +01:00
Kristian Dupont 5684fd5aa8 Disable dead code elimination (#757)
* Disable dead code elimination

* Remove changes from realmjs project
2016-12-21 16:27:04 +01:00
Mark Rowe 537bc19858 Fix running `./scripts/test.sh react-tests`. (#747)
The RealmReactTests target was failing to build because it was not
linking against libReact.a
2016-12-21 16:00:38 +01:00
Nabil Hachicha b9706b1e80 Nh/fixes 740 (#743)
* Fix Android testing CI job, we don't use the packager since we build the Release bundle
* Test run on Docker-cph-01 or Docker-cph-02
2016-12-20 19:01:45 +00:00
Nabil Hachicha 43dabf5cbd Nh/symbol iterator android (#732)
* Fix Symbol.iterator on Android
2016-12-20 18:56:51 +00:00
Kristian Dupont c1e7ddcda1 Throw when deleting detached object (#694)
* Throw when deleting detached object

* Update error message

* Add user file

* Throw when deleting detached object

* Update error message

* Revert "Add user file"

This reverts commit 2948f4cfc2dfd2d5d75594307b1e89806b817eb7.
2016-12-20 16:28:02 +01:00
Radu Tutueanu d7c44fa7e9 Use mockery in tests to setup the realm module path(#727)
* Use mockery to set up the realm module path

* Use the right path

* Add mockery to devDependencies

* Remove unnecessary symbolic link
2016-12-09 09:05:15 +01:00
Radu Tutueanu 8eb639678e Accept a custom path for the realm module (#725)
* Accept a custom path for the realm module

* Use the correct argument for the realm module path
2016-12-08 13:01:41 +01:00
Kristian Dupont 43d94d1b8b Add checks for removeListener 2016-12-07 16:31:52 +01:00
Kristian Dupont 1d4bb7c2ad Add more tests and fix add_notification 2016-12-07 16:31:52 +01:00
Kristian Dupont bf85c285a0 Add tests for closed-realm access protection 2016-12-07 16:31:52 +01:00
Ari Lazier b9a2c92a8b test fixes 2016-12-06 14:43:07 +01:00
Marius Rackwitz 8964e4d7f9 Only set the path derived from the SyncManager if none was provided (#679)
* Only set the path derived from the SyncManager if none was provided

* Disable synchronizeChangeswithTwoClientsAndOneUser
2016-11-29 10:51:26 +01:00
Adam Lebsack 9900d24181 Merge pull request #664 from realm/ajl/add-tests
Added tests directory to package.json
2016-11-28 13:44:44 +01:00
Adam Lebsack 88e840f315 Merge remote-tracking branch 'origin/master' into ajl/jenkinsfile 2016-11-25 11:33:48 +01:00
Adam Lebsack 5ac6d97833 Added support for React tests on android in docker (phew) 2016-11-24 16:58:16 +01:00
Ari Lazier 19e91c1f7b don't include ios app in the package 2016-11-17 07:35:51 -08:00
Radu Tutueanu 8d5acd7da5 Fix docs and test according to new api 2016-11-16 13:36:41 +01:00
Ari Lazier fabaf5e819 Merge pull request #653 from realm/nh/update_android
Nh/update android
2016-11-15 10:06:20 -08:00
Søren Vind 06d277aacd Bumped version of ESLint, added eslinting of specs, make all linting pass 2016-11-14 10:48:50 -08:00
Marius Rackwitz b01349087c Add a test which synchronizes a change between two clients 2016-11-14 17:36:47 +01:00
Nabil Hachicha a53e802df3 Merge branch 'al-sync-user-tests' of https://github.com/realm/realm-js into al-sync-user-tests 2016-11-14 13:26:54 +00:00
Nabil Hachicha fdf88c2f78 Adding a build type to switch between Core & Core+Sync 2016-11-14 13:26:33 +00:00
Ari Lazier eef8a2de3b property clean up sync state between tests in c++ 2016-11-12 05:26:37 -08:00
Ari Lazier 695d6f9efb suppress garbage debug info 2016-11-11 21:20:04 -08:00
Ari Lazier baa8321453 fix test 2016-11-11 19:33:21 -08:00
Søren Vind 14e75f12bc Documentation for .all and .current 2016-11-11 14:54:12 -08:00
Ari Lazier bb7e98cbbe use latest rn version 2016-11-11 12:01:31 -08:00
Ari Lazier d229cd6130 throw exception when trying to open a realm with an invalid user 2016-11-11 00:14:52 -08:00
Ari Lazier 08ffc3bf15 ccache support 2016-11-10 23:55:26 -08:00
Ari Lazier 81402f890b use yarn and fix for test app package.json 2016-11-10 23:11:31 -08:00
Søren Vind 88aae65721 Test logout, slightly better test scaffolding (so now we run tests to completion on the outer level of callbacks). 2016-11-10 18:06:27 -08:00