Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests from ReactNative #62

Merged
merged 34 commits into from
Oct 19, 2015
Merged

Run tests from ReactNative #62

merged 34 commits into from
Oct 19, 2015

Conversation

alazier
Copy link
Contributor

@alazier alazier commented Oct 14, 2015

No description provided.

alazier and others added 10 commits October 8, 2015 15:50
Added a CommonJS module loader that is used by XCTestCase subclass to load and run the tests.
Needs this to link to GCDWebServer.
* 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
  ...

'use strict';

exports.ArrayTests = require('./ArrayTests');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In one of the other files, we changed the style to

exports = {
    ArrayTests: require('./ArrayTests'),
    ...
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's worth doing that here but I do some other manipulations of exports in a future commit.

appden and others added 10 commits October 15, 2015 03:00
An exception was thrown when parsing the JSON when only a string was passed. This is better and no longer uses the Objective-C API for converting the dictionary to a JSValue.
Error responses were not having this set, which obscured the true error from the client.
The deleteTestFiles() function is now added to the Realm object, so that it's easy for the RPC module to handle this as well. We can only do this in testing environments in the future.
The test structure is now provided by a JS API, that is used by all things that run tests. Also, the tests can be run manually by tapping a button in the ReactTests app.
This also appears to fix crashes when running ReactTests with Chrome debugging enabled!

The crash when tests failed was due to JavaScriptCore trying to create a backtrace with the native call stack.
@alazier alazier changed the title [WIP] Run tests from ReactNative Run tests from ReactNative Oct 19, 2015
@alazier
Copy link
Contributor Author

alazier commented Oct 19, 2015

Lets review this and git it merged!

@alazier
Copy link
Contributor Author

alazier commented Oct 19, 2015

I'm happy with this at this point 👍

@alazier
Copy link
Contributor Author

alazier commented Oct 19, 2015

The new tests are now successfully running on ci.

alazier added a commit that referenced this pull request Oct 19, 2015
@alazier alazier merged commit 8ee6e75 into master Oct 19, 2015
@appden appden deleted the sk-test-suite branch October 20, 2015 08:25
alazier pushed a commit that referenced this pull request May 5, 2016
Move cmake_minimum_required() to the correct place
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants