Skip to content

When two test suites have the same name, one of them will be overriden #27

Description

@Aboisier

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions