MCPcopy
hub / github.com/BorisMoore/jquery-tmpl / test_handler

Function test_handler

tests/core.js:25–33  ·  view source on GitHub ↗
( test_name, res, exp )

Source from the content-addressed store, hash-verified

23};
24
25function test_handler( test_name, res, exp ) {
26 var is_err = ($.isFunction(exp) && exp.prototype instanceof Error);
27 if ( is_err && res instanceof exp ) {
28 ok( res instanceof exp, test_name );
29 }
30 else {
31 same( res, exp, test_name );
32 }
33}
34
35// these are used throughout to test if tag blocks suppress them
36jQuery.tmpl.tag.syntax_error = { open: "throw SyntaxError('test syntax error');" };

Callers 1

core.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected