-
-
Notifications
You must be signed in to change notification settings - Fork 197
Fix unit test runner on Windows #1207
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
test android | ||
========== | ||
|
||
Usage | Synopsis | ||
------|------- | ||
Run tests on all connected devices | `$ tns test android [--watch] [--debug-brk]` | ||
Run tests on a selected device | `$ tns test android --device <Device ID> [--watch] [--debug-brk]` | ||
|
||
Runs the tests in your project on connected Android devices and running native emulators.<% if(isConsole) { %> Your project must already be configured for unit testing by running `$ tns test init`.<% } %> | ||
|
||
### Options | ||
* `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device and tests are re-run. | ||
* `--device` - Specifies the serial number or the index of the connected device on which to run the tests. To list all connected devices, grouped by platform, run `$ tns device` | ||
* `--debug-brk` - Runs the tests under the debugger. The debugger will break just before your tests are executed, so you have a chance to place breakpoints. | ||
|
||
### Attributes | ||
* `<Device ID>` is the device index or identifier as listed by `$ tns device` | ||
|
||
<% if(isHtml) { %> | ||
### Prerequisites | ||
|
||
* Verify that [you have configured your project for unit testing](test-init.html). | ||
* Verify that [you have stored your unit tests in `app` → `tests`](http://docs.nativescript.org/testing). | ||
* Verify that [you have configured your system and devices properly](http://docs.nativescript.org/testing). | ||
|
||
### Related Commands | ||
Command | Description | ||
--------|------------ | ||
[test init](test-init.html) | Configures your project for unit testing with a selected framework. | ||
[test ios](test-ios.html) | Runs the tests in your project on iOS devices or the iOS Simulator. | ||
<% } %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
test ios | ||
========== | ||
|
||
Usage | Synopsis | ||
------|------- | ||
Run tests on all connected devices | `$ tns test ios [--watch] [--debug-brk]` | ||
Run tests on a selected device | `$ tns test ios --device <Device ID> [--watch] [--debug-brk]` | ||
Run tests in the iOS Simulator | `$ tns test ios --emulator [--watch] [--debug-brk]` | ||
|
||
Runs the tests in your project on connected iOS devices or the iOS Simulator.<% if(isConsole && isMacOS) { %> Your project must already be configured for unit testing by running `$ tns test init`.<% } %> | ||
|
||
<% if(isConsole && (isLinux || isWindows)) { %>WARNING: You can run this command only on OS X systems. To view the complete help for this command, run `$ tns help test ios`<% } %> | ||
|
||
<% if((isConsole && isMacOS) || isHtml) { %> | ||
### Options | ||
* `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device and tests are re-ran. | ||
* `--device` - Specifies the serial number or the index of the connected device on which you want to run tests. To list all connected devices, grouped by platform, run `$ tns device`. You cannot set `--device` and `--emulator` simultaneously. | ||
* `--emulator` - Runs tests on the iOS Simulator. You cannot set `--device` and `--emulator` simultaneously. | ||
* `--debug-brk` - Runs the tests under the debugger. The debugger will break just before your tests are executed, so you have a chance to place breakpoints. | ||
|
||
### Attributes | ||
* `<Device ID>` is the device index or identifier as listed by `$ tns device`<% } %> | ||
|
||
<% if(isHtml) { %> | ||
### Prerequisites | ||
|
||
* Verify that [you have configured your project for unit testing](test-init.html). | ||
* Verify that [you have stored your unit tests in `app` → `tests`](http://docs.nativescript.org/testing). | ||
* Verify that [you have configured your system and devices properly](http://docs.nativescript.org/testing). | ||
|
||
### Related Commands | ||
Command | Description | ||
--------|------------ | ||
[test init](test-init.html) | Configures your project for unit testing with a selected framework. | ||
[test android](test-android.html) | Runs the tests in your project on Android devices or native emulators. | ||
<% } %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can move these callbacks outside the body of startTestRunner.