Ошибка броска теста JavaScript

expect( function(){ parser.parse(raw); } ).toThrow(new Error("Parsing is not possible"));
Splendid Swiftlet