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

Use cli-testlab for testing CLI #3191

Merged
merged 11 commits into from May 13, 2019

Conversation

Projects
None yet
2 participants
@kibertoad
Copy link
Collaborator

commented May 12, 2019

Here is a bit of mad science that I was busy with lately: a better, more seamless and way less verbose way to test CLI (still using Jake, but in a more embedded way).
This is to serve as a PoC of sorts. Should this be merged, I'll migrate all remaining cli tests to cli-testlab and remove knex internal CLI testing microframework

@kibertoad kibertoad requested a review from elhigu May 12, 2019

let fileHelper;
beforeEach(() => {
fileHelper = new FileTestHelper(path.resolve(__dirname, '../jake-util'));
fileHelper.deleteFile('test.sqlite3');

This comment has been minimized.

Copy link
@kibertoad

kibertoad May 12, 2019

Author Collaborator

this is to prevent preexisting file from messing up tests. could be moved to before block, but that would require some juggling around fileHelper instantiation

@elhigu

elhigu approved these changes May 13, 2019

Copy link
Collaborator

left a comment

Looks clean and good

@elhigu

This comment has been minimized.

Copy link
Collaborator

commented May 13, 2019

Would be nice to include also tape / jake tests to be run with coverage to have real coverage numbers

@kibertoad

This comment has been minimized.

Copy link
Collaborator Author

commented May 13, 2019

@elhigu Will look into tape one, but with Jake don't think it's that simple, as it is executed in a separate process still.

@kibertoad kibertoad merged commit f34013b into master May 13, 2019

2 of 3 checks passed

coverage/coveralls Coverage decreased (-0.8%) to 88.714%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@kibertoad kibertoad deleted the tests/cli-testlab branch May 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.