-
Notifications
You must be signed in to change notification settings - Fork 6
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
[DIT-6187] Test coverage improvements #103
Conversation
TEXT_DIR, | ||
TEXT_FILE, | ||
}; | ||
export default new (class { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all places but one we already imported the default export of this file (and I refactored that one place), so this doesn't change anything functionally, but we can utilize the ES6 getter to dynamically set these values in tests by changing environment variables at runtime.
@@ -0,0 +1,367 @@ | |||
import fs from "fs"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was renamed from pull.test.ts
to pull-lib.test.ts
-- most of code shown as changed I didn't actually touch. I will leave a comment on the things that were changed.
}); | ||
}); | ||
|
||
const { getJsonFormat } = _test; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added tests from here down
lib/pull.test.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be reviewed as a brand new file. All of the old code in the file was moved to pull-lib.test.ts
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested cli locally, everything is working great
Overview
Improves mocking capabilities generally and adds a bunch of tests to improve coverage.
Context
https://linear.app/dittowords/issue/DIT-6187/cli-audit-existing-tests
https://linear.app/dittowords/issue/DIT-6186/cli-pull-integration-tests-which-validate-files-written-to-disk
Test Plan
pull
writes files to disk with a non-default configuration