This problem stems from the loadTests method. We need to throw an error if there is a name conflict instead of blindly overrinding the previous test suite.
public async loadTests(root: string, patterns: string[], tsconfig: tsnode.Options): Promise<TestSuiteInstance> {
this.registerTranspiler(tsconfig);
const testSuites = new RootTestSuite();
const files = await this.getTestFiles(root, patterns);
for (const file of files) {
const testInstances = await this.getTestInstancesFromFile(file);
testInstances.forEach(x => testSuites.set(x.name, x));
}
return testSuites;
}
This problem stems from the
loadTestsmethod. We need to throw an error if there is a name conflict instead of blindly overrinding the previous test suite.