Created
April 17, 2019 18:38
-
-
Save ohze/954b1c8a52320e48744b7b7cf72491fc to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/dafijuqepi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<link href="https://code.jquery.com/qunit/qunit-git.css" rel="stylesheet" type="text/css" /> | |
<script src="https://code.jquery.com/qunit/qunit-git.js"></script> | |
</head> | |
<body> | |
<div id="qunit"></div> | |
<div id="qunit-fixture"></div> | |
<script id="jsbin-javascript"> | |
function f() { | |
throw new Error('err'); | |
} | |
function errCheck(e) { | |
return e.message == 'err'; | |
} | |
QUnit.test('foo', (t) => { | |
t.throws(f, errCheck); | |
t.throws(f, (e) => e.message == 'err'); | |
}) | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function f() { | |
throw new Error('err'); | |
} | |
function errCheck(e) { | |
return e.message == 'err'; | |
} | |
QUnit.test('foo', (t) => { | |
t.throws(f, errCheck); | |
t.throws(f, (e) => e.message == 'err'); | |
})</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function f() { | |
throw new Error('err'); | |
} | |
function errCheck(e) { | |
return e.message == 'err'; | |
} | |
QUnit.test('foo', (t) => { | |
t.throws(f, errCheck); | |
t.throws(f, (e) => e.message == 'err'); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment