Ejemplo n.º 1
1
 it('does not load invalid YAML', () => assert.throws(() => load('petstore-invalid.yaml')));
Ejemplo n.º 2
0
 it('should not accept a selector to an unknown element as input', function() {
   assert.throws(function() {
     makeDOMDriver('#nonsenseIdToNothing');
   }, /Cannot render into unknown element/);
 });
Ejemplo n.º 3
0
 test('throws if bad ++opt name', () => {
   assert.throws(() => commandParsers.write('++foo=foo'));
 });
Ejemplo n.º 4
0
export function ReflectDecorateThrowsIfDecoratorsArgumentNotArrayForFunctionOverload() {
    let target = function() { };
    assert.throws(() => Reflect.decorate(undefined, target, undefined, undefined), TypeError);
}
Ejemplo n.º 5
0
	test('register command - no handler', function () {
		assert.throws(() => CommandsRegistry.registerCommand('foo', null));
	});
Ejemplo n.º 6
0
 it("does not infinite loop on incomplete JSX", () => {
   throws(() => transform("const x = <", {transforms: ["jsx"]}));
 });
Ejemplo n.º 7
0
export function ReflectDecorateThrowsIfTargetArgumentNotObjectForPropertyOverload() {
    let decorators: (ClassDecorator | MethodDecorator | PropertyDecorator)[] = [];
    let target = 1;
    let name = "name";
    assert.throws(() => Reflect.decorate(decorators, target, name, undefined), TypeError);
}
Ejemplo n.º 8
0
 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);
 });
Ejemplo n.º 9
0
 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);
 });
Ejemplo n.º 10
0
 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);
 });