-
Notifications
You must be signed in to change notification settings - Fork 2
JsAssertLibrary
cbaxter edited this page Dec 29, 2011
·
1 revision
For those looking for simple assertions similar to those found in MSTest, NUnit or xUnit, JSTest includes a very simple assert object that may be used when appended to any given TestScript instance.
assert.fail = function (message);
assert.isTrue = function (expression, message);
assert.isFalse = function (expression, message);
assert.isNull = function (actual, message);
assert.isNotNull = function (actual, message);
assert.isUndefined = function (actual, message);
assert.isNotUndefined = function (actual, message);
assert.equal = function (expected, actual, message);
assert.notEqual = function (notExpected, actual, message);
assert.throws = function (expected, action, message);
Note: message
is always an optional parameter.