Commit Graph

16 Commits

Author SHA1 Message Date
Ari Lazier 7b5be78df2 close to working test harness 2015-10-14 18:52:55 -07:00
Ari Lazier e470c5d189 run tests from subclass 2015-10-14 15:46:46 -07:00
Scott Kyle c8c1910910 Expose global cleanupTestRealms function
This handles clearing out all of the test files between each test case.
2015-10-14 15:26:05 -07:00
Scott Kyle 39b262b279 Each test can now have a beforeEach and afterEach 2015-10-14 15:02:19 -07:00
Scott Kyle dc84ac63b6 Merge branch 'sk-react-framework' into sk-test-suite
* sk-react-framework: (27 commits)
  Change RealmReact to be a dynamic framework
  finish Array to List rename
  RJSArray -> RJSList
  move property getters to object store code
  move List class to its own file
  ObjectArray -> List
  Add Notification constructor and destructor
  Small improvement to notifications test
  RJSException no longer requires JS strings
  Protect realm and callback from GC in addNotification
  Add comments
  pr fixes
  minimal tests for migrations
  Check for NaN inside RJSValidatedValueToNumber
  allow running all tests at the same path by invalidating all cached realm paths between test runs
  Native methods should convert to numbers/bools
  Out of bounds getters for Results return undefined
  Out of bounds list item getters return undefined
  Consolidate code that verifies array index bounds
  Add list item setters in JS
  ...
2015-10-14 02:12:50 -07:00
Ari Lazier f6e0d34022 RJSArray -> RJSList 2015-10-13 15:27:24 -07:00
Ari Lazier c81ea6e5be pr fixes 2015-10-12 17:18:49 -07:00
Ari Lazier 8ad1b0907d minimal tests for migrations 2015-10-12 17:01:51 -07:00
Ari Lazier aa035717a5 allow running all tests at the same path by invalidating all cached realm paths between test runs 2015-10-12 16:43:05 -07:00
Scott Kyle 88352721f7 Make all tests explicitly require realm module 2015-10-08 16:19:19 -07:00
Scott Kyle db80c3a89a Refactor tests to run again inside Xcode
Added a CommonJS module loader that is used by XCTestCase subclass to load and run the tests.
2015-10-08 15:54:30 -07:00
Ari Lazier 08fada74d6 fix so that RealmJS tests work again 2015-10-08 15:50:10 -07:00
Scott Kyle 675e26e200 Test failures now report the real failure location
In the case of test failures, a TestFailureError object is thrown, which removes the last two stack frames so the true source of the failure is revealed to the native code.

Clicking on a failure in the Xcode sidebar will take you to exactly where it occurred now.

Fixes #28
2015-09-28 16:09:03 -07:00
Ari Lazier f7b4fd6f4a test existing array functionality 2015-08-14 10:47:56 -07:00
Ari Lazier ca4dfa052c proper copyright 2015-08-14 08:18:49 -07:00
Ari Lazier 12b942fecd move js work from realm-cocoa-private 2015-08-13 09:12:48 -07:00