Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 309 Bytes

test-ended.md

File metadata and controls

30 lines (20 loc) · 309 Bytes

Ensure callback tests are explicitly ended

If you forget a t.end(); in a test it may hang indefinitely.

Fail

import test from 'tape';

test(t => {
	t.pass();
});

Pass

import test from 'tape';

test(t => {
	t.pass();
	t.end();
});

test(t => {
	acceptsCallback(t.end);
});