Skip to content

fix: Trying to run unit test fails with latest karma #3698

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
Jun 22, 2018

Conversation

rosen-vladimirov
Copy link
Contributor

When tests are initialized, the tns test <platform> command fails in case karma 2.0.3 is used. In order to fix it, until karma resolves the issue on their side, hardcode the version of karma that is installed by CLI on tns test init command.

Also install mocha when it is selected for testing framework. In case we do not install it, the test command fails again.

PR Checklist

What is the current behavior?

tns test init --framework mocha && tns test <platform> command fails to execute the tests.

What is the new behavior?

The command executes the tests.

Fixes: #3689 and #2283

When tests are initialized, the `tns test <platform>` command fails in case karma 2.0.3 is used. In order to fix it, until karma resolves the issue on their side, hardcode the version of karma that is installed by CLI on `tns test init` command.

Also install mocha when it is selected for testing framework. In case we do not install it, the test command fails again.
@rosen-vladimirov rosen-vladimirov added this to the 4.1.2 milestone Jun 21, 2018
@rosen-vladimirov rosen-vladimirov self-assigned this Jun 21, 2018
}
];

modulesToInstall.push(...dependencies.map(f => ({ name: f })));
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't be {name: 'karma-' + f }?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rosen-vladimirov rosen-vladimirov merged commit a2d491e into release Jun 22, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-karma-tests branch June 22, 2018 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants