Skip to content

Commit

Permalink
export IConfiguration interface for API users (#2064)
Browse files Browse the repository at this point in the history
* export IConfiguration interface for API users

* update CHANGELOG.md

* add tsd test
  • Loading branch information
davidjgoss committed Jun 21, 2022
1 parent 0f5dab7 commit 9877338
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) on how to contribute to Cucumber.

## [Unreleased]
### Fixed
- Export `IConfiguration` type on API entry point ([#2064](https://github.com/cucumber/cucumber-js/pull/2064))

## [8.3.0] - 2022-06-11
### Added
Expand Down
1 change: 1 addition & 0 deletions src/api/index.ts
Expand Up @@ -5,6 +5,7 @@
* @packageDocumentation
*/

export { IConfiguration } from '../configuration'
export * from './load_configuration'
export * from './load_sources'
export * from './load_support'
Expand Down
7 changes: 5 additions & 2 deletions test-d/api.ts
@@ -1,5 +1,8 @@
import { loadConfiguration, runCucumber } from '../api'
import { IConfiguration, loadConfiguration, runCucumber } from '../api'

// should allow api usage from /api subpath
const { runConfiguration } = await loadConfiguration()
const provided: Partial<IConfiguration> = {
paths: ['features/foo.feature'],
}
const { runConfiguration } = await loadConfiguration({ provided })
const { success } = await runCucumber(runConfiguration)

0 comments on commit 9877338

Please sign in to comment.