Skip to content

Change the way karma communicate with CLI #23

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 2 commits into from
Feb 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ function NativeScriptLauncher(baseBrowserDecorator, logger, config, args, emitte

var launcherConfig = config._NS || {};

emitter.on('file_list_modified', function() {
self.log.info('Deploying NativeScript unit tests...');
if (self.parsedUrl) {
self.liveSyncAndRun(self.parsedUrl);
}
})

emitter.on('browser_register', function(browser) {
if (!browser.id || browser.id.indexOf('NativeScript') !== 0) {
return;
Expand All @@ -52,6 +45,7 @@ function NativeScriptLauncher(baseBrowserDecorator, logger, config, args, emitte
process.stdout.write(data);
}

// Consider removing this in case we drop support for `tns dev-test` command
self.liveSyncAndRun = function() {
var tnsArgs = ['dev-test', self.platform, '--port', self.parsedUrl.port];
if (args.arguments) {
Expand Down Expand Up @@ -91,7 +85,7 @@ function NativeScriptLauncher(baseBrowserDecorator, logger, config, args, emitte

self.start = function(url) {
self.parsedUrl = URL.parse(url);
self.liveSyncAndRun();
process.send({ url: self.parsedUrl, launcherConfig: JSON.stringify(launcherConfig.options) });
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "karma-nativescript-launcher",
"version": "0.3.1",
"version": "0.4.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down