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

test(config-lerna-scopes): add regression tests #979

Merged

Conversation

armano2
Copy link
Contributor

@armano2 armano2 commented Feb 8, 2020

Add regression tests for semver call

Description

This will ensure that we are validating correct code path in rule

Motivation and Context

Refactoring can break stuff, its better to test this.

Usage examples

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@@ -35,6 +35,7 @@
"execa": "0.11.0",
"fs-extra": "^8.1.0",
"pkg-dir": "4.2.0",
"resolve-pkg": "2.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this package is used within test but was present only in config-lerna-scopes

@armano2 armano2 requested a review from marionebl February 8, 2020 22:36
@@ -70,5 +71,27 @@ test('returns expected value for scoped lerna repository', async () => {
test('works with lerna version < 3', async () => {
const {'scope-enum': fn} = config.rules;
const cwd = await lerna.bootstrap('lerna-two', __dirname);
await expect(fn({cwd})).resolves.toBeTruthy();
const [, , value] = await fn({cwd});
expect(value).toEqual(['a2', 'b2']);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

small improvement to test, we should validate what is actually returned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants