From 987733862adab8ae16cc0d5516628b1ede71b753 Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 21 Jun 2022 11:42:28 +0100 Subject: [PATCH] export IConfiguration interface for API users (#2064) * export IConfiguration interface for API users * update CHANGELOG.md * add tsd test --- CHANGELOG.md | 2 ++ src/api/index.ts | 1 + test-d/api.ts | 7 +++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 371b094c2..c712e7bc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/api/index.ts b/src/api/index.ts index ddf849e54..e0097383c 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -5,6 +5,7 @@ * @packageDocumentation */ +export { IConfiguration } from '../configuration' export * from './load_configuration' export * from './load_sources' export * from './load_support' diff --git a/test-d/api.ts b/test-d/api.ts index e7dda5934..450592cec 100644 --- a/test-d/api.ts +++ b/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 = { + paths: ['features/foo.feature'], +} +const { runConfiguration } = await loadConfiguration({ provided }) const { success } = await runCucumber(runConfiguration)