stencil-compile-invalid-argument.js (538B)
1 // Passing non-object to `options` argument of stencil testing functions should 2 // throw. 3 4 load(libdir + "asserts.js"); 5 6 const stencil = compileToStencil(""); 7 const xdr = compileToStencilXDR(""); 8 9 for (const arg of [0, 1.1, "foo", true, false, null, Symbol.iterator]) { 10 assertThrowsInstanceOf(() => compileToStencil("", arg), Error); 11 assertThrowsInstanceOf(() => evalStencil(stencil, arg), Error); 12 assertThrowsInstanceOf(() => compileToStencilXDR("", arg), Error); 13 assertThrowsInstanceOf(() => evalStencilXDR(xdr, arg), Error); 14 }