-
Notifications
You must be signed in to change notification settings - Fork 29
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
Improve integration tests #225
Conversation
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.
Awesome!
console.log("Updated functions module export"); | ||
} | ||
|
||
export const _internals = { |
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.
Nice! I've been wanting to try this pattern in our deno projects for a loooong time!
import { getSlackFunctions } from "../../../../../../src/schema/slack/functions/_scripts/src/utils.ts"; | ||
|
||
Deno.test(`write_function_files.ts ${_internals.main.name} function generates valid typescript`, async () => { | ||
const getSlackFunctionsStub = mock.stub( |
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.
👨🍳 💋
love it
Summary
This PR introduces an integration test that ensure that the output files of the generation script are always valid typescript. The goal of this test is to ensure no breaking changes to the generation script are introduced inadvertently.
The integration tests are not included in the code coverage but will get executed by the CI pipeline.
testing
tests/integration/schema/slack/functions/_scripts/write_function_files_test.ts
gets executedsrc/schema/slack/functions/_scripts/README.md
to try out the generation script and ensure everything still worksRequirements
deno task test
after making the changes.