From e532790dd690ac8936d642b1392b14cba91e2569 Mon Sep 17 00:00:00 2001 From: Joe Lapp Date: Sun, 17 Jul 2016 11:13:00 -0500 Subject: [PATCH] In docs, clarified when 'msg' describes the assertion. Also clarified 'expected' in throws(). --- readme.markdown | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/readme.markdown b/readme.markdown index a5d41242..a45db947 100644 --- a/readme.markdown +++ b/readme.markdown @@ -190,13 +190,13 @@ Generate an assertion that will be skipped over. ## t.ok(value, msg) -Assert that `value` is truthy with an optional description message `msg`. +Assert that `value` is truthy with an optional description of the assertion `msg`. Aliases: `t.true()`, `t.assert()` ## t.notOk(value, msg) -Assert that `value` is falsy with an optional description message `msg`. +Assert that `value` is falsy with an optional description of the assertion `msg`. Aliases: `t.false()`, `t.notok()` @@ -209,14 +209,14 @@ Aliases: `t.ifError()`, `t.ifErr()`, `t.iferror()` ## t.equal(actual, expected, msg) -Assert that `actual === expected` with an optional description `msg`. +Assert that `actual === expected` with an optional description of the assertion `msg`. Aliases: `t.equals()`, `t.isEqual()`, `t.is()`, `t.strictEqual()`, `t.strictEquals()` ## t.notEqual(actual, expected, msg) -Assert that `actual !== expected` with an optional description `msg`. +Assert that `actual !== expected` with an optional description of the assertion `msg`. Aliases: `t.notEquals()`, `t.notStrictEqual()`, `t.notStrictEquals()`, `t.isNotEqual()`, `t.isNot()`, `t.not()`, `t.doesNotEqual()`, `t.isInequal()` @@ -225,8 +225,7 @@ Aliases: `t.notEquals()`, `t.notStrictEqual()`, `t.notStrictEquals()`, Assert that `actual` and `expected` have the same structure and nested values using [node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) -with strict comparisons (`===`) on leaf nodes and an optional description -`msg`. +with strict comparisons (`===`) on leaf nodes and an optional description of the assertion `msg`. Aliases: `t.deepEquals()`, `t.isEquivalent()`, `t.same()` @@ -234,8 +233,7 @@ Aliases: `t.deepEquals()`, `t.isEquivalent()`, `t.same()` Assert that `actual` and `expected` do not have the same structure and nested values using [node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) -with strict comparisons (`===`) on leaf nodes and an optional description -`msg`. +with strict comparisons (`===`) on leaf nodes and an optional description of the assertion `msg`. Aliases: `t.notEquivalent()`, `t.notDeeply()`, `t.notSame()`, `t.isNotDeepEqual()`, `t.isNotDeeply()`, `t.isNotEquivalent()`, @@ -245,7 +243,7 @@ Aliases: `t.notEquivalent()`, `t.notDeeply()`, `t.notSame()`, Assert that `actual` and `expected` have the same structure and nested values using [node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) -with loose comparisons (`==`) on leaf nodes and an optional description `msg`. +with loose comparisons (`==`) on leaf nodes and an optional description of the assertion `msg`. Aliases: `t.looseEqual()`, `t.looseEquals()` @@ -253,17 +251,17 @@ Aliases: `t.looseEqual()`, `t.looseEquals()` Assert that `actual` and `expected` do not have the same structure and nested values using [node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) -with loose comparisons (`==`) on leaf nodes and an optional description `msg`. +with loose comparisons (`==`) on leaf nodes and an optional description of the assertion `msg`. Aliases: `t.notLooseEqual()`, `t.notLooseEquals()` ## t.throws(fn, expected, msg) -Assert that the function call `fn()` throws an exception. `expected`, if present, must be a `RegExp` or `Function`. +Assert that the function call `fn()` throws an exception. `expected`, if present, must be a `RegExp` or `Function`. The `RegExp` matches the string representation of the exception, as generated by `err.toString()`. The `Function` is the exception thrown (e.g. `Error`). `msg` is an optional description of the assertion. ## t.doesNotThrow(fn, expected, msg) -Assert that the function call `fn()` does not throw an exception. +Assert that the function call `fn()` does not throw an exception. `msg` is an optional description of the assertion. ## t.test(name, [opts], cb)