Is there a corresponding setting for NUnit TestCaseSource in Jasmine?

When writing unit tests with NUnit, you can provide multiple input combinations using TestCaseSourceAttribute

. Example from NUnit Documentation :

private static object[] DivideCases = {
    new object[] {12, 3, 4},
    new object[] {12, 2, 6},
    new object[] {12, 4, 3}
};

[Test, TestCaseSource("DivideCases")]
public void DivideTest(int n, int d, int q) {
    Assert.AreEqual(q, n/d);
}

      

This will run DivideTest

three times with the arguments supplied by the field DivideCases

.

Is there a way to achieve a similar setup with Jasmine?

+3


source to share





All Articles