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
Merged

Use cli-testlab for testing CLI #3191

merged 11 commits into from May 13, 2019

Conversation

@kibertoad
Copy link
Collaborator

@kibertoad kibertoad 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');
Copy link
Collaborator Author

@kibertoad kibertoad May 12, 2019

Choose a reason for hiding this comment

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

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
Member

@elhigu elhigu left a comment

Looks clean and good

@elhigu
Copy link
Member

@elhigu elhigu commented May 13, 2019

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

@kibertoad
Copy link
Collaborator Author

@kibertoad kibertoad 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
@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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants