alsatian-test / alsatian

TypeScript testing framework with test cases

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alsatian calling constructor for non text fixture class

hisuwh opened this issue · comments

I have a defined a test class and put in a file suffixed .test.ts (which matches the glob pattern passed to Alsatian). I've put it in a file named like this so it's clear its for tests.

However, this results in Alsatian calling the constructor (which results in an unhandled exception as a required argument is not passed).

I can see the offending line is here

There is a comment (here) which says it won't provide a default fixture as of v2.0.0 as the TestFixture decorator is to be made mandatory. I'm on v2.4.0 (and Alsatian is up to v3.0.0) and this functionality is still here.

I'd willing to look into sending a PR but this would obviously be a breaking change so wondering how you want to handle this. Also, I'm not sure of the state of v3 at the moment (hence why I'm still on v2) so not sure where this fix would need to go.