Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

disabled or irrelevant tests

Basically just some things I don't want to lose
  • Loading branch information...
commit 0ec97664df2494d710d8e047797c94473be4c159 1 parent 93d46ec
@isaacs authored
View
36 test-disabled/bailout.js
@@ -0,0 +1,36 @@
+var tap = require("tap")
+ , test = tap.test
+
+test("bailout test", { skip: false }, function (t) {
+
+ // t.once("bailout", function () {
+ // console.error("bailout event")//, t)
+ // t.clear()
+ // })
+
+ // t.once("end", function () {
+ // console.error("end event")
+ // })
+
+ // simulate three tests where the second bails out.
+ t.test("first", function (t) {
+ t.pass("this is ok")
+ t.end()
+ })
+
+ t.test("bailout", function (t) {
+ console.error("bailout test")
+ t.pass("pass")
+ t.bailout("bail out message")
+ t.fail("fail")
+ t.end()
+ })
+
+ t.test("second (should not happen)", function (t) {
+ t.fail("this should not happen")
+ t.end()
+ })
+
+ t.end()
+
+})
View
1  test-disabled/foo.js
@@ -0,0 +1 @@
+process.stdin
View
16 test-disabled/t.js
@@ -0,0 +1,16 @@
+var test = require('tap').test;
+
+function foo() {
+ throw new Error('one');
+}
+
+test('demonstrate bug in t.throws', function (t) {
+ t.throws(
+ function () {
+ foo();
+ },
+ new Error('two')),
+ // "this should throw",
+ // {}); // not 'one'!
+ t.end();
+});
Please sign in to comment.
Something went wrong with that request. Please try again.