createStoreFromConfig
createStoreFromConfig(
config,importer?):Promise<IStore>
Defined in: packages/core/src/store/create-store.ts:88
Resolve a store instance from the unified config. Looks up a
registered plugin descriptor by store type; if none is found, tries
to dynamic-import config.store.module and then the convention
@flaky-tests/store-<type> so each adapter self-registers via its
own definePlugin call.
Parameters
Section titled “Parameters”config
Section titled “config”ConfigShape
importer?
Section titled “importer?”StoreModuleImporter = defaultImporter
Returns
Section titled “Returns”Promise<IStore>
Throws
Section titled “Throws”MissingStorePackageError when no matching plugin descriptor is registered and none of the candidate module specifiers can be imported. The error names both the store type and the exact install command.
Throws
Section titled “Throws”re-throws any non-”module-not-found” error from importer()
unchanged so real import failures (syntax errors, runtime throws in
the adapter’s top-level code) surface with their original stacks.
Throws
Section titled “Throws”re-throws any error from the adapter’s create(config) —
this function does not wrap constructor failures. A store that
throws ValidationError or Error from its constructor will
propagate that error as-is.