test_print_stderr.js (465B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 add_task(async function() { 6 Assert.throws( 7 () => Cu.printStderr(), 8 /Not enough arguments/, 9 "Without argument printStderr throws" 10 ); 11 12 const types = ["", "foo", 42, true, null, {foo: "bar"}]; 13 types.forEach(type => Cu.printStderr(type)); 14 });