summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Debugger-findObjects-08.js
blob: fd6ceb1031d76ea8c51f8d4c80d1c86c6e761e7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Passing bad query properties to Debugger.prototype.findScripts throws.

load(libdir + 'asserts.js');

var dbg = new Debugger();
var g = newGlobal();

assertThrowsInstanceOf(() => dbg.findObjects({ class: null }), TypeError);
assertThrowsInstanceOf(() => dbg.findObjects({ class: true }), TypeError);
assertThrowsInstanceOf(() => dbg.findObjects({ class: 1337 }), TypeError);
assertThrowsInstanceOf(() => dbg.findObjects({ class: /re/ }), TypeError);
assertThrowsInstanceOf(() => dbg.findObjects({ class: {}   }), TypeError);