alsatian icon indicating copy to clipboard operation
alsatian copied to clipboard

Alsatian calling constructor for non text fixture class

Open hisuwh opened this issue 5 years ago • 0 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.

hisuwh avatar Oct 12 '19 22:10 hisuwh