119 Commits

Author SHA1 Message Date
Ari Lazier
d8c89c7098 support for truepredicate/falsepredicate, single quote strings - all tests now pass 2015-11-19 13:05:37 -08:00
Scott Kyle
7b115a934b ArrayBufferView objects now fully supported
Previously we were not accounting for the byte offsets and misunderstood how the Uint8Array constructor worked. The tests now confirm everything works as expected with multiple different typed arrays and slices of the data.
2015-11-17 13:32:32 -08:00
Scott Kyle
7f32ab0b88 Improve JS test assertion failure messages
Only the first line is shown in Xcode, so we just a dash to separate the custom message from the helpful one provided by the assertion instead.
2015-11-17 13:32:32 -08:00
Scott Kyle
3bf84a1b6f Update data properties to return ArrayBuffers
As a convenience, the setters will take typed Arrays (e.g. Uint8Array) since that is a common representation of data in JS (as they are "views" of ArrayBuffer objects).

The tests have been updated to reflect this new behavior.
2015-11-17 13:32:31 -08:00
Ari Lazier
283826e687 support latest version 2015-11-13 10:13:33 -08:00
Ari Lazier
5b29f09e7a don't require any GCDWebServers dependency when building Release 2015-11-11 15:37:03 -08:00
Scott Kyle
5320df9a5f Merge pull request #116 from realm/sk-realmjs-api
Create API that returns constructor JSObjectRef
2015-11-03 16:39:08 -08:00
Scott Kyle
2f4bcee5ce Update test to ensure unique listener callback behavior 2015-11-03 14:45:06 -08:00
Scott Kyle
aff11983f3 Create API that returns constructor JSObjectRef
Resolves #98
2015-11-02 22:51:33 -08:00
Scott Kyle
8cb7e43e2e Merge pull request #115 from realm/sk-fix-chrome-tests
Re-enable chrome tests
2015-11-02 17:00:11 -08:00
Scott Kyle
84b419c815 Fix to run RealmReactTests with release builds
In the case of a release build, React Native will not include the RCTWebSocketExecutor.
2015-11-02 15:20:49 -08:00
Ari Lazier
6c6931a97d enable chrome tests 2015-11-02 13:50:16 -08:00
Scott Kyle
7181a00f01 Fix to make RealmReact tests work in Chrome again
Left the RealmReactChromeTests commented out for now until it's confirmed to work in the CI environment.
2015-11-02 13:38:00 -08:00
Scott Kyle
aa55b61b86 Update React Native to 0.13.2 2015-11-02 13:38:00 -08:00
Ari Lazier
87b2c0f6c4 basic tests for null objects during upsert 2015-11-02 13:30:42 -08:00
Ari Lazier
196a0a15a4 allow setting nullable properties to undefined 2015-11-02 10:08:23 -08:00
Scott Kyle
0b35564830 Merge pull request #107 from realm/sk-live-update-fixes
Ensure Lists and Results live-update in Chrome
2015-10-28 10:46:43 -07:00
Scott Kyle
d5d05c5d15 Add comments to test to explain canceling transaction 2015-10-28 10:45:42 -07:00
Scott Kyle
b38b87e2f4 Add beta license to ReactTests index.ios.js 2015-10-28 10:40:07 -07:00
Scott Kyle
0eb3b49970 Ensure Lists and Results live-update in Chrome
Results needed to live-update during a transaction (not just as the end), and Lists needed to update on deletions as well.
2015-10-28 10:21:32 -07:00
Ari Lazier
841f45a7b2 change the license before starting the beta 2015-10-27 14:15:21 -07:00
Ari Lazier
fd1ebf0aa0 remove extra newline 2015-10-27 13:45:37 -07:00
Ari Lazier
18d65471be fix and tests for setting null properties 2015-10-27 12:13:57 -07:00
Ari Lazier
ac1cdfdc8b support null for basic propety types 2015-10-27 12:13:57 -07:00
Ari Lazier
fc631c3e6f wont work until we have propery object store support 2015-10-27 12:13:57 -07:00
Scott Kyle
0511bade62 Non-existent object getters shouldn't throw exceptions 2015-10-27 09:39:52 -07:00
Ari Lazier
a1c4cd5702 pr fixes 2015-10-27 07:48:11 -07:00
Ari Lazier
6f41c3cf68 take notification name 2015-10-26 19:18:24 -07:00
Ari Lazier
6f57500972 change notification name to change 2015-10-26 16:19:12 -07:00
Ari Lazier
246ccc7bde add other notification methods 2015-10-26 16:15:46 -07:00
Scott Kyle
9cfcc2ea9e Fix for running RealmReactTests in release mode
The RTCDevMenu is missing the `moduleName` class method in release mode.
2015-10-26 14:57:50 -07:00
Scott Kyle
32ebd7f218 Remove RCTTest linkage from ReactTests and ReactExample
This module has build errors with Release configuration and is not necessary. When in Chrome debugging mode, a warning will be issued about missing the RCTSnapshot module though, which is why we linked against it in the first place.
2015-10-26 14:57:06 -07:00
Scott Kyle
a2cd949e09 Prevent tests from ever opening Chrome
The test is commented out for now.
2015-10-26 13:25:15 -07:00
Scott Kyle
0843d69a4f Expose RealmJS API as C functions
We're still using Objective-C to delete test files, so we can't rename the implementation file quite yet.
2015-10-26 01:14:33 -07:00
Scott Kyle
4d73c13466 Merge branch 'sk-chrome-xcode-tests'
* sk-chrome-xcode-tests:
  Actually report test failures when running in Chrome
  Change RealmReactTests to run with both executors
  Fix RealmReactTests to work through Chrome
  Use a default to override Chrome debugging setting
  Change ReactTests project to 4 space indentation
2015-10-23 16:38:17 -07:00
Scott Kyle
1ede355b78 Actually report test failures when running in Chrome
Turns out Chrome doesn't report back exceptions, but instead does pass back an array of five empty arrays (I am not kidding).
2015-10-23 14:13:38 -07:00
Scott Kyle
e7b05d2dc6 Change RealmReactTests to run with both executors
A new approach was needed for this. The RCTDevMenu is disabled so that it doesn't interfere with us changing the executor class. A suffix is added to the name of test cases that are run in Chrome.
2015-10-23 14:12:35 -07:00
Ari Lazier
92a9113ef6 get it to compile 2015-10-22 15:31:26 -07:00
Scott Kyle
2fe1f0d26e Fix RealmReactTests to work through Chrome
The key idea was the cycle the runloop once after receiving the RCTJavaScriptDidLoadNotification so that the RCTDevMenu could also handle that notification and setup the bridge properly, as well as not block the main thread by spinning the runloop instead.
2015-10-22 02:49:15 -07:00
Scott Kyle
6a8fa75a37 Use a default to override Chrome debugging setting
This is done in a way that does not override the persistent user defaults. You set this default when launching the app by supplying `-RealmReactEnableChromeDebugging YES/NO` launch arguments.
2015-10-22 02:47:10 -07:00
Scott Kyle
56ad4faa19 Change ReactTests project to 4 space indentation
Also changed copyright notice.
2015-10-22 02:34:46 -07:00
Ari Lazier
ac544205a1 test setting all primitive types to null/undefined throw 2015-10-21 23:06:39 -07:00
Ari Lazier
08a84bd8e9 cleanup scheme and target names 2015-10-21 19:20:45 -07:00
Scott Kyle
bd2d1559d1 Error when assigning to Result index or length
Added some tests. Turns out our Chrome layer already did this too, so no changes were needed there.

Resolves #70
2015-10-21 15:25:53 -07:00
Scott Kyle
d50e3ae68c Add Object.keys test for Results 2015-10-21 15:21:17 -07:00
Scott Kyle
d55d42da8d Add ESLint config for JS test files
This helps the editor catch simple syntax issues before finding out about them when running a test.
2015-10-21 15:20:44 -07:00
Scott Kyle
8ba3a24eae Move RealmJSCoreTests.m to tests directory
Test failures were not pointing to the correct JS file path when it was in the src directory. This is where it belongs anyways.
2015-10-21 15:18:47 -07:00
Scott Kyle
36382ecb56 Add instanceof test for Results 2015-10-21 15:17:55 -07:00
Scott Kyle
7acd4d89c1 Update ReactTests project to React Native 0.13.0-rc 2015-10-21 13:57:34 -07:00
Scott Kyle
0055d0510c Make List objects work with Object.keys in Chrome
Rather than using Object.preventExtensions to throw exceptions when setting any out-of-bounds index, we must instead compromise by only throwing for the common cases, which are -1 and list.length. Having Object.keys() support is essential for List to work with React Native ListViewDataSource.

Resolves #80
2015-10-21 13:11:41 -07:00