File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ changes:
151
151
* ` ...message ` {any} All arguments besides ` value ` are used as error message.
152
152
153
153
A simple assertion test that verifies whether ` value ` is truthy. If it is not,
154
+ or ` value ` is not passed,
154
155
` Assertion failed ` is logged. If provided, the error ` message ` is formatted
155
156
using [ ` util.format() ` ] [ ] by passing along all message arguments. The output is
156
157
used as the error message.
@@ -160,6 +161,8 @@ console.assert(true, 'does nothing');
160
161
// OK
161
162
console .assert (false , ' Whoops %s work' , ' didn\' t' );
162
163
// Assertion failed: Whoops didn't work
164
+ console .assert ();
165
+ // Assertion failed
163
166
```
164
167
165
168
Calling ` console.assert() ` with a falsy assertion will only cause the ` message `
You can’t perform that action at this time.
0 commit comments