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

refactor: tests #1986

Merged
merged 1 commit into from Jun 6, 2019
Merged

refactor: tests #1986

merged 1 commit into from Jun 6, 2019

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Jun 6, 2019

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

not required

Motivation / Use-Case

Refactor test part #1

Breaking Changes

No

Additional Info

Ideally each option should have:

  1. Unit test (own)
  2. Integration test (Server.test.js)
  3. E2E test (can be avoided for non client options)
  4. CLI test (can be avoided right now)

We should concentrate on 1 and 2 points right now.

Other changes what we should do:

  • avoid using --runInBand it is decrease time on tests
  • union option.test.js and validation.test.js (they do same)
  • rewrite some test in more effective way
  • better naming of tests

@alexander-akait alexander-akait requested a review from hiroppy as a code owner Jun 6, 2019
@hiroppy
Copy link
Member

@hiroppy hiroppy commented Jun 6, 2019

maybe we can not avoid using --runInBand because many tests have same port.

@alexander-akait
Copy link
Member Author

@alexander-akait alexander-akait commented Jun 6, 2019

@hiroppy We can setup for tests using difference port 😄

@hiroppy
Copy link
Member

@hiroppy hiroppy commented Jun 6, 2019

Yes, but we should consider managing ports because it is easy to conflict ports.

@alexander-akait
Copy link
Member Author

@alexander-akait alexander-akait commented Jun 6, 2019

I think we can use getPort utils in test helper, it is require refactor, but it is possible and tests always use difference port

hiroppy
hiroppy previously approved these changes Jun 6, 2019
Copy link
Member

@hiroppy hiroppy left a comment

LGTM if ci is green 💯

@alexander-akait
Copy link
Member Author

@alexander-akait alexander-akait commented Jun 6, 2019

Anyway let's do it in other PRs, not here 😄

@alexander-akait
Copy link
Member Author

@alexander-akait alexander-akait commented Jun 6, 2019

Missing snapshot (updated)

hiroppy
hiroppy approved these changes Jun 6, 2019
@alexander-akait alexander-akait merged commit 638d7a1 into master Jun 6, 2019
15 checks passed
@alexander-akait alexander-akait deleted the refactor-tests branch Jun 6, 2019
hiroppy added a commit that referenced this issue Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants