Copy link to clipboard
Copied
Hi again,
This rule, EmptyUnitTest, keeps complaining that "A test should contain at least one assertion". But, in my asynchrounous tests I perform only two things: a "Async.handleEvent(...)" and then a call to the method that will trigger the event. There are no assertions in this function but the assertions are placed in the handler function of the event.
Shouldn't this rule check whether there's an "async" option in the test metadata tag?
Regards,
Alex
And I have attached a fix for it.
Can you test it, please?
Xavier
Copy link to clipboard
Copied
It sounds like a enhancement to this rule.
Could you log a bug in JIRA attaching a example?
Are you using FlexUnit 4 or FlexUnit 0.9?
Xavier
Copy link to clipboard
Copied
Ok. New enhancement request: https://bugs.adobe.com/jira/browse/FLEXPMD-132
I'm using FlexUnit 4, btw.
Copy link to clipboard
Copied
Thanks for the feature request.
It would be great if you could attach a example file, I could add it to unit test suite.
Thanks.
BTW: I advise you to "watch" the issue in JIRA, in order to be notified when the issue is resolved.
Xavier
Copy link to clipboard
Copied
I have attached a Maven Flex project with an asynchronous FlexUnit4 test
Copy link to clipboard
Copied
And I have attached a fix for it.
Can you test it, please?
Xavier
Copy link to clipboard
Copied
I no longer see those EmptyUnitTest violations. Thanks dude