testingrequired / bespin

A test framework engine
0 stars 0 forks source link

Config builder methods don't work in example project #7

Open kyleect opened 3 years ago

kyleect commented 3 years ago

Builder methods don't exist on configs coming from Config.load

I suspect this is from how config is being imported: https://github.com/testingrequired/bespin/blob/5879390bba92f0e4841b84283ddef83c95e2a51c/packages/core/src/Config.ts#L39

This imported config has a default property which is not correct.

Expected

const config = await Config.load(configFilePath);
config.withReporter(new SomeReporter()); // Throws for `withReporter` being undefined

Actual

const config = await Config.load(configFilePath);
config.reporters.push(new SomeReporter()); // Work around