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: Move simpler tests from lib/* to single test runner #3988

Merged
merged 5 commits into from
Mar 14, 2016

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Mar 11, 2016

Part of #3942.

This PR removes 22 Makefile files located in `client/lib/* and moves related test suites to single test runner. In addition it also fixes all ESLint warnings found in modified test files.

By design I skipped all test files that have filesystem mocks and use globals :)

Testing

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

@gziolo gziolo self-assigned this Mar 11, 2016
@gziolo gziolo added this to the Framework: Single test runner milestone Mar 11, 2016
@gziolo gziolo force-pushed the update/client-lib-tests-move branch from 365731f to 262f5d6 Compare March 11, 2016 16:59
@gziolo gziolo force-pushed the update/client-lib-tests-move branch 2 times, most recently from d379b60 to 1098f50 Compare March 11, 2016 18:55
@@ -27,6 +27,6 @@ function findQuickMocks( dirpath ) {
} );
}

export default function( dirpath ) {
export default function( dirpath = __dirname ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this the path of this file though? I didn't provide a default because I think it's always wrong... but maybe I'm wrong?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you are right. I forgot to remove my failed try to make it smarter :D

@gziolo gziolo force-pushed the update/client-lib-tests-move branch from 1098f50 to 48ba7e4 Compare March 14, 2016 08:11
@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 14, 2016
@gziolo
Copy link
Member Author

gziolo commented Mar 14, 2016

/cc @blowery

@@ -11,7 +11,7 @@ var mockSites = null,
},
actions;

describe( 'Recommended Site Store Actions', function() {
describe( 'actions', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Mockery setup a couple lines past should be cleaned up

Copy link
Member Author

Choose a reason for hiding this comment

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

I see it now, thanks :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated to use mockery helper

@blowery
Copy link
Contributor

blowery commented Mar 14, 2016

🚢 looks good

@blowery blowery 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 14, 2016
gziolo added a commit that referenced this pull request Mar 14, 2016
Test: Move simpler tests from `lib/*` to single test runner
@gziolo gziolo merged commit 503844c into master Mar 14, 2016
@gziolo gziolo deleted the update/client-lib-tests-move branch March 14, 2016 13:39
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