diff options
Diffstat (limited to 'installed-tests/js/testConsole.js')
-rw-r--r-- | installed-tests/js/testConsole.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/installed-tests/js/testConsole.js b/installed-tests/js/testConsole.js index 2e699fff..c999e9f3 100644 --- a/installed-tests/js/testConsole.js +++ b/installed-tests/js/testConsole.js @@ -177,6 +177,29 @@ describe('console', function () { writer_func.calls.reset(); }); + it('asserts a true condition', function () { + console.assert(true, 'no printed'); + expect(writer_func).not.toHaveBeenCalled(); + + writer_func.calls.reset(); + }); + + it('asserts a false condition', function () { + console.assert(false); + + expectLog('Assertion failed', GLib.LogLevelFlags.LEVEL_CRITICAL); + + writer_func.calls.reset(); + }); + + it('asserts a false condition with message', function () { + console.assert(false, 'asserts false is not true'); + + expectLog('asserts false is not true', GLib.LogLevelFlags.LEVEL_CRITICAL); + + writer_func.calls.reset(); + }); + describe('clear()', function () { it('can be called', function () { console.clear(); |