Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Aboisier opened this issue Feb 15, 2019 · 0 comments
Open
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Aboisier
Copy link
Collaborator

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;
}
@Aboisier Aboisier added bug Something isn't working good first issue Good for newcomers labels Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant