Skip to content

test(cli): migrates tests from ava to jest #907

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 4 commits into from
Jan 26, 2020

Conversation

armano2
Copy link
Contributor

@armano2 armano2 commented Jan 26, 2020

Migrates CI tests from ava to jest

Description

While doing this refactor i took opportunity to validate why some of tests was not passing on windows machines and i added appropriate comments.

// npm install is failing on windows machines
// The filename, directory name, or volume label syntax is incorrect.
// await execa('npm', ['install'], {cwd});

There is still one that is failing on windows machine:

  • should print full commit message when input from stdin fails
    its actually not an issue but test is failing:
Expected substring: "foo: bar·
Foo bar bizz buzz.·
Closes #123."
Received string:    "⧗   input: foo: bar

Foo bar bizz buzz.

Closes #123."

How Has This Been Tested?

Unrelated

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.

test('should throw when called without [input]', async t => {
const cwd = await git.bootstrap('fixtures/default');
const gitBootstrap = fixture => git.bootstrap(fixture, __dirname);
const fixBootstrap = fixture => fix.bootstrap(fixture, __dirname);
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 is needed as jest is executed from root directory, ava was executed in each package separately

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I'd figure, I think I briefly discussed this with Mario sometime ago. I'll put it on the list of stuff to do before v9 release 👍

@armano2
Copy link
Contributor Author

armano2 commented Jan 26, 2020

bdw. i do recommend to do squash merges instead (as it will not pollute history with partial commits)

Copy link
Member

@byCedric byCedric left a comment

Choose a reason for hiding this comment

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

Don't worry about the commits, we always squash them down 😄

@byCedric
Copy link
Member

Looks great, again! ❤️ I can merge it after the types thing 😄

@byCedric byCedric merged commit afb2105 into conventional-changelog:master Jan 26, 2020
@armano2 armano2 deleted the cli-tests branch January 26, 2020 21:38
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