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

[WIP] Migrate tests from Ava to Jest #38

Closed
wants to merge 5 commits into from

Conversation

baransu
Copy link
Contributor

@baransu baransu commented Dec 21, 2017

Proposal to migrate tests from Ava to Jest.
While I was working on #37 I was using Ava to run tests in watch mode. It was slow and for TDD it wasn't great. I propose switching tests to Jest which runs much faster and has great interactive watch mode which is amazing for TDD.

I've converted all tests using jest-codemod and manually. CONTRIBUTING.md is also updated to mention Jest watch mode.

On thing I've discovered is problem with if statement if(x == 0) which is no working properly. I was testing it with Walt Explorer and it behaves the same, while live version at https://ballercat.github.io/walt/ works as intended. I don't know what is causing this but would appreciate some help if you want to support this migration.

@baransu baransu changed the title Migrate tests from Ava to Jest [WIP] Migrate tests from Ava to Jest Dec 21, 2017
@ballercat
Copy link
Owner

Okay there are a few things here. Let me address them separately.

if (x === 0)

This is probably a regression from #27. @baransu could you provide a minimal spec and open an issue for this? If it's working in the explorer as intended it's because I have not upgraded the builds yet.

Jest

I don't see a reason to migrate to Jest at this point in time. But couple of things:

  • Proposals should be tied to Issues. I'm not going to pivot on a test runner without discussing it first.
  • There is probably an easier way to improve the TDD speed for you without rewriting the specs. Open up an issue, provide your setup and npm scripts you used to tdd your changes. I personally have no issue TDD-ing as should be evident by 140+ specs already written.

@baransu
Copy link
Contributor Author

baransu commented Dec 21, 2017

Great. Thank you for the feedback. It took me just a couple of minutes to make that switch because I've wanted to test it myself so I've created an PR to discuss the changes having something. I'll create issue next time.

@baransu baransu closed this Dec 21, 2017
@baransu baransu deleted the migrate-tests-to-jest branch December 21, 2017 16:15
ballercat added a commit that referenced this pull request Dec 24, 2017
Implement #34
Fix #40
Fix(pretty sure) if/then regression mentioned in #38
Add coverage
Add gitter badge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants