Skip to content

Commit 1cda8c7

Browse files
authored
Refer to assertion inputs as "actual"
1 parent 6b63b1b commit 1cda8c7

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

docs/03-assertions.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -101,51 +101,51 @@ Passing assertion. Returns a boolean indicating whether the assertion passed.
101101

102102
Failing assertion. Returns a boolean indicating whether the assertion passed.
103103

104-
### `.assert(value, message?)`
104+
### `.assert(actual, message?)`
105105

106-
Asserts that `value` is truthy. Returns a boolean indicating whether the assertion passed.
106+
Asserts that `actual` is truthy. Returns a boolean indicating whether the assertion passed.
107107

108-
### `.truthy(value, message?)`
108+
### `.truthy(actual, message?)`
109109

110-
Assert that `value` is truthy. Returns a boolean indicating whether the assertion passed.
110+
Assert that `actual` is truthy. Returns a boolean indicating whether the assertion passed.
111111

112-
### `.falsy(value, message?)`
112+
### `.falsy(actual, message?)`
113113

114-
Assert that `value` is falsy. Returns a boolean indicating whether the assertion passed.
114+
Assert that `actual` is falsy. Returns a boolean indicating whether the assertion passed.
115115

116-
### `.true(value, message?)`
116+
### `.true(actual, message?)`
117117

118-
Assert that `value` is `true`. Returns a boolean indicating whether the assertion passed.
118+
Assert that `actual` is `true`. Returns a boolean indicating whether the assertion passed.
119119

120-
### `.false(value, message?)`
120+
### `.false(actual, message?)`
121121

122-
Assert that `value` is `false`. Returns a boolean indicating whether the assertion passed.
122+
Assert that `actual` is `false`. Returns a boolean indicating whether the assertion passed.
123123

124-
### `.is(value, expected, message?)`
124+
### `.is(actual, expected, message?)`
125125

126-
Assert that `value` is the same as `expected`. This is based on [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). Returns a boolean indicating whether the assertion passed.
126+
Assert that `actual` is the same as `expected`. This is based on [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). Returns a boolean indicating whether the assertion passed.
127127

128-
### `.not(value, expected, message?)`
128+
### `.not(actual, expected, message?)`
129129

130-
Assert that `value` is not the same as `expected`. This is based on [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). Returns a boolean indicating whether the assertion passed.
130+
Assert that `actual` is not the same as `expected`. This is based on [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). Returns a boolean indicating whether the assertion passed.
131131

132-
### `.deepEqual(value, expected, message?)`
132+
### `.deepEqual(actual, expected, message?)`
133133

134-
Assert that `value` is deeply equal to `expected`. See [Concordance](https://github.com/concordancejs/concordance) for details.
134+
Assert that `actual` is deeply equal to `expected`. See [Concordance](https://github.com/concordancejs/concordance) for details.
135135

136-
### `.notDeepEqual(value, expected, message?)`
136+
### `.notDeepEqual(actual, expected, message?)`
137137

138-
Assert that `value` is not deeply equal to `expected`. The inverse of `.deepEqual()`. Returns a boolean indicating whether the assertion passed.
138+
Assert that `actual` is not deeply equal to `expected`. The inverse of `.deepEqual()`. Returns a boolean indicating whether the assertion passed.
139139

140-
### `.like(value, selector, message?)`
140+
### `.like(actual, selector, message?)`
141141

142-
Assert that `value` is like `selector`. This is a variant of `.deepEqual()`, however `selector` does not need to have the same enumerable properties as `value` does.
142+
Assert that `actual` is like `selector`. This is a variant of `.deepEqual()`, however `selector` does not need to have the same enumerable properties as `actual` does.
143143

144-
Instead AVA derives a *comparable* object from `value`, based on the deeply-nested properties of `selector`. This object is then compared to `selector` using `.deepEqual()`.
144+
Instead AVA derives a *comparable* object from `actual`, based on the deeply-nested properties of `selector`. This object is then compared to `selector` using `.deepEqual()`.
145145

146-
Any values in `selector` that are not regular objects should be deeply equal to the corresponding values in `value`.
146+
Any values in `selector` that are not regular objects should be deeply equal to the corresponding values in `actual`.
147147

148-
In the following example, the `map` property of `value` must be deeply equal to that of `selector`. However `nested.qux` is ignored, because it's not in `selector`.
148+
In the following example, the `map` property of `actual` must be deeply equal to that of `selector`. However `nested.qux` is ignored, because it's not in `selector`.
149149

150150
```js
151151
t.like({

0 commit comments

Comments
 (0)