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:
151151* ` ...message ` {any} All arguments besides ` value ` are used as error message.
152152
153153A simple assertion test that verifies whether ` value ` is truthy. If it is not,
154+ or ` value ` is not passed,
154155` Assertion failed ` is logged. If provided, the error ` message ` is formatted
155156using [ ` util.format() ` ] [ ] by passing along all message arguments. The output is
156157used as the error message.
@@ -160,6 +161,8 @@ console.assert(true, 'does nothing');
160161// OK
161162console .assert (false , ' Whoops %s work' , ' didn\' t' );
162163// Assertion failed: Whoops didn't work
164+ console .assert ();
165+ // Assertion failed
163166```
164167
165168Calling ` console.assert() ` with a falsy assertion will only cause the ` message `
You can’t perform that action at this time.
0 commit comments