Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 752 Bytes

xunit-async.md

File metadata and controls

49 lines (34 loc) · 752 Bytes

Ensure that the xunit Async annotation is used well (async)

To ensure developers put into the right place the Async annotation.

Here are some examples:

// Bad
[Async]
function myTest () {
  // ...
};

// Bad
[Fact, Async]
function myTest () {
  // ...
};

// Good
[Fact, Async]
function myTest (callback) {
  // ...
};

Rule Details

Options

  • callbackParameterName will be used (when defined) to put a convention on the test function parameter name (Default '').

callbackParameterName

Examples of correct code for the default { "callbackParameterName": { "myCallback" } } option:

[Fact, Async]
function myTest(myCallback) {
  // ...
};

Known Limitations

When Not To Use It

Further Reading