-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement pickle filtering and ordering with plugins (#2361)
- Loading branch information
1 parent
18a86f3
commit 052ac1a
Showing
21 changed files
with
616 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,55 @@ | ||
import { Plugin, PluginManager } from '../plugin' | ||
import { PluginManager } from '../plugin' | ||
import publishPlugin from '../publish' | ||
import { ILogger } from '../logger' | ||
import { IRunEnvironment, IRunOptions } from './types' | ||
import filterPlugin from '../filter' | ||
import { | ||
IRunConfiguration, | ||
IRunEnvironment, | ||
ISourcesCoordinates, | ||
} from './types' | ||
|
||
const INTERNAL_PLUGINS: Record<string, Plugin> = { | ||
publish: publishPlugin, | ||
export async function initializeForLoadSources( | ||
logger: ILogger, | ||
coordinates: ISourcesCoordinates, | ||
environment: Required<IRunEnvironment> | ||
): Promise<PluginManager> { | ||
// eventually we'll load plugin packages here | ||
const pluginManager = new PluginManager() | ||
await pluginManager.init( | ||
'loadSources', | ||
filterPlugin, | ||
coordinates, | ||
logger, | ||
environment | ||
) | ||
return pluginManager | ||
} | ||
|
||
export async function initializeForLoadSupport(): Promise<PluginManager> { | ||
// eventually we'll load plugin packages here | ||
return new PluginManager() | ||
} | ||
|
||
export async function initializePlugins( | ||
export async function initializeForRunCucumber( | ||
logger: ILogger, | ||
configuration: IRunOptions, | ||
environment: IRunEnvironment | ||
configuration: IRunConfiguration, | ||
environment: Required<IRunEnvironment> | ||
): Promise<PluginManager> { | ||
// eventually we'll load plugin packages here | ||
const pluginManager = new PluginManager(Object.values(INTERNAL_PLUGINS)) | ||
await pluginManager.init(logger, configuration, environment) | ||
const pluginManager = new PluginManager() | ||
await pluginManager.init( | ||
'runCucumber', | ||
publishPlugin, | ||
configuration.formats.publish, | ||
logger, | ||
environment | ||
) | ||
await pluginManager.init( | ||
'runCucumber', | ||
filterPlugin, | ||
configuration.sources, | ||
logger, | ||
environment | ||
) | ||
return pluginManager | ||
} |
Oops, something went wrong.