Skip to content

fix: migrate fails when karma.config.js is missing #4811

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 1 commit into from
Jul 5, 2019

Conversation

rosen-vladimirov
Copy link
Contributor

In case you've installed nativescript-unit-test-runner , but you've not used tns test init, tns migrate command fails with error:
Could not migrate the project! The error is: Error: ENOENT: no such file or directory, open '<project dir>/.migration_backup/karma.conf.js'
Skip the migration of the karma.conf.js file in case it is missing. Also, ensure karma-webpack is always added by the migration when nativescript-unit-test-runner is migrated.

PR Checklist

What is the current behavior?

When you execute the following:

$ tns create myApp --js
$ cd myApp
$ npm i --save-dev nativescript-unit-test-runner
$ tns migrate

The command fails with error: Could not migrate the project! The error is: Error: ENOENT: no such file or directory, open '<project dir>/.migration_backup/karma.conf.js'

What is the new behavior?

Command successfully migrates project which has nativescript-unit-test-runner, but does not have karma.conf.js file.

Fixes/Implements/Closes #[Issue Number].

In case you've installed `nativescript-unit-test-runner` , but you've not used `tns test init`, `tns migrate` command fails with error:
`Could not migrate the project! The error is: Error: ENOENT: no such file or directory, open '<project dir>/.migration_backup/karma.conf.js'`
Skip the migration of the `karma.conf.js` file in case it is missing. Also, ensure `karma-webpack` is always added by the migration when `nativescript-unit-test-runner` is migrated.
@rosen-vladimirov rosen-vladimirov merged commit 5262184 into release Jul 5, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-migrate-unit-test branch July 5, 2019 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants