MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / expectFail

Function expectFail

lib/web/CodeMirror/test/vim_test.js:118–125  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

116}
117
118function expectFail(fn) {
119 try {
120 fn();
121 } catch(expected) {
122 return;
123 };
124 throw new Error("Expected to throw an error");
125}
126
127function testVim(name, run, opts, expectedFail) {
128 var vimOpts = {

Callers 1

vim_test.jsFile · 0.85

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected