Testy / TestyTs

✔️ Modern TypeScript testing framework.
http://testy.github.io
ISC License
123 stars 8 forks source link

Two test classes with the same base class are merged #8

Closed Aboisier closed 5 years ago

Aboisier commented 5 years ago

I've had a problem where two test classes inheriting the same base class are merged.

class Base { 
    @beforeEach() beforeEach() { }
}

@testSuite()
export class A extends Base {
    @test() testA() { }
}

@testSuite()
export class B extends Base {
    @test() testB() { }
}

A and B will both have tests testA and testB. A's name will also be overwritten with B.

Aboisier commented 5 years ago

It seems like the problem only happens when the base class has a decorator.

https://stackoverflow.com/questions/48122319/why-do-typescript-decorators-on-a-base-class-cause-extensions-to-affect-one-anot