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

Tests: Move Spectrum related tests to single test runner #3978

Merged
merged 5 commits into from
Mar 11, 2016

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Mar 11, 2016

Part of #3942.

It contains:

  • client/lib/cart-values
  • client/lib/cart/store
  • client/lib/credit-card-details
  • client/lib/network-connection - library created during my trial :)
  • client/lib/plans-list
  • client/my-sites/upgrades/cart
  • client/my-sites/upgrades/components/domain-warnings
  • client/my-sites/upgrades/domain-search (moved to client/components/domains/domain-suggestion)

Testing

  1. Open terminal.
  2. Go to client folder.
  3. Run make test.

It contains: lib/cart-values, lib/cart/store, lib/credit-card-details and library created by me lib/network-connection.
It contains:
* client/lib/plans-list
* client/my-sites/upgrades/cart
* client/my-sites/upgrades/components/domain-warnings
* client/my-sites/upgrades/domain-search
@gziolo
Copy link
Member Author

gziolo commented Mar 11, 2016

/cc @janm6k @blowery @aduth @mtias @nb

It looks like this PR contains most of standard refactorings necessary to migrate to single test runner. Last missing bits can be found in #3973 from @blowery which introduces new immutablyEqual helper and uses useMockery helper.

Let me list here common refactorings:

  • remove sinonChai setup (it is now part of single runner setup)
  • replace mockery setup with useMockery helper call
  • replace require( 'lib/react-test-env-setup' )(); with useFakeDom helper call
  • add useFilesystemMocks helper call whenever we override app files in tests
  • chai-immutable is about to be removed, but we should promote using immutablyEqual helper

To consider:

  • mirror test file name with file under test
  • mirror test describe label with file name

Once we merge those 2 PRs we should write P2 summary post and ask for help all Calypso developers.

@gziolo gziolo added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Mar 11, 2016
@janm6k
Copy link
Contributor

janm6k commented Mar 11, 2016

👍 Nice!

@janm6k janm6k added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Mar 11, 2016
gziolo added a commit that referenced this pull request Mar 11, 2016
…-tests

Tests: Move Spectrum related tests to single test runner
@gziolo gziolo merged commit b5518ce into master Mar 11, 2016
@gziolo gziolo deleted the update/move-spectrum-related-tests branch March 11, 2016 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants