it('does not load invalid YAML', () => assert.throws(() => load('petstore-invalid.yaml')));
it('should not accept a selector to an unknown element as input', function() { assert.throws(function() { makeDOMDriver('#nonsenseIdToNothing'); }, /Cannot render into unknown element/); });
test('throws if bad ++opt name', () => { assert.throws(() => commandParsers.write('++foo=foo')); });
export function ReflectDecorateThrowsIfDecoratorsArgumentNotArrayForFunctionOverload() { let target = function() { }; assert.throws(() => Reflect.decorate(undefined, target, undefined, undefined), TypeError); }
test('register command - no handler', function () { assert.throws(() => CommandsRegistry.registerCommand('foo', null)); });
it("does not infinite loop on incomplete JSX", () => { throws(() => transform("const x = <", {transforms: ["jsx"]})); });
export function ReflectDecorateThrowsIfTargetArgumentNotObjectForPropertyOverload() { let decorators: (ClassDecorator | MethodDecorator | PropertyDecorator)[] = []; let target = 1; let name = "name"; assert.throws(() => Reflect.decorate(decorators, target, name, undefined), TypeError); }
it('should throw if second argument is not an object', function() { assert.throws(() => { (run as any)(() => {}, 'not an object'); }, /Second argument given to Cycle must be an object with driver functions/i); });
it('should throw if second argument is an empty object', function() { assert.throws(() => { (run as any)(() => {}, {}); }, /Second argument given to Cycle must be an object with at least one/i); });
test("try to read lines that don't exist", () => { assert.equal(vscode.window.activeTextEditor.document.lineCount, 1); assert.throws(() => TextEditor.readLineAt(1), RangeError); assert.throws(() => TextEditor.readLineAt(2), RangeError); });