-
Notifications
You must be signed in to change notification settings - Fork 59
feat: Add tests for config feature #1407
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
01228f8
dafd6ba
c9e41b7
17f12da
cfc6e2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this test should not be part of the e2e suite, although it uses gherkin steps, it is fast and can be run during normal unit test execution |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { configSteps } from '../step-definitions/configSteps'; | ||
| import type { State } from '../step-definitions/state'; | ||
| import { autoBindSteps, loadFeatures } from 'jest-cucumber'; | ||
| import { CONFIG_FEATURE } from '../constants'; | ||
|
|
||
| jest.setTimeout(50000); | ||
MarkoMlakar marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| describe('config', () => { | ||
| const state: State = { | ||
| resolverType: 'in-process', | ||
| options: {}, | ||
| config: undefined, | ||
| events: [], | ||
| }; | ||
| autoBindSteps( | ||
| loadFeatures(CONFIG_FEATURE, { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The config.feature gherkin file is part of the in-process and rpc tests. In-Process and RPC cover all *.feature files. I don't think there is need for a specific config.spec.ts file.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are correct :) However the motivation for having a separate config.spec.ts file was to enable the test to run without requiring a container to be started |
||
| scenarioNameTemplate: (vars) => { | ||
| const tags = [...vars.scenarioTags, ...vars.featureTags]; | ||
MarkoMlakar marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return `${vars.scenarioTitle}${tags.length > 0 ? ` (${tags.join(', ')})` : ''}`; | ||
| }, | ||
| }), | ||
| [configSteps(state)], | ||
| ); | ||
| }); | ||
Uh oh!
There was an error while loading. Please reload this page.