summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_print_stderr.js
blob: 4c2d87ae7ac1585d0d2e42cd8be94f24c528856b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

add_task(async function() {
  Assert.throws(
    () => Cu.printStderr(),
    /Not enough arguments/,
    "Without argument printStderr throws"
  );

  const types = ["", "foo", 42, true, null, {foo: "bar"}];
  types.forEach(type => Cu.printStderr(type));
});