Package: node-p-finally / 2.0.1-1

replace-ava-by-tape.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Description: replace ava by tape
Author: Xavier Guimard <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2021-01-03

--- a/test.js
+++ b/test.js
@@ -1,11 +1,12 @@
-import test from 'ava';
-import pFinally from '.';
+const test = require('tape');
+const pFinally = require('.');
 
 const fixture = Symbol('fixture');
 const fixtureError = new Error('error');
 
 test('does nothing when nothing is passed', async t => {
 	t.is(await pFinally(Promise.resolve(fixture)), fixture);
+	t.end();
 });
 
 test('callback is called when promise is fulfilled', async t => {
@@ -17,6 +18,7 @@
 
 	t.is(value, fixture);
 	t.true(isCalled);
+	t.end();
 });
 
 test('callback is called when promise is rejected', async t => {
@@ -29,6 +31,7 @@
 	});
 
 	t.true(isCalled);
+	t.end();
 });
 
 test('returning a rejected promise in the callback rejects the promise', async t => {
@@ -37,12 +40,14 @@
 	}, error => {
 		t.is(error, fixtureError);
 	});
+	t.end();
 });
 
 test('returning a rejected promise in the callback for an already rejected promise changes the rejection reason', async t => {
 	await pFinally(Promise.reject(new Error('original error')), () => Promise.reject(fixtureError)).catch(error => {
 		t.is(error, fixtureError);
 	});
+	t.end();
 });
 
 test('the onFinally callback is only called once no matter what', async t => {
@@ -55,4 +60,5 @@
 			throw new Error(); // eslint-disable-line unicorn/error-message
 		}
 	).catch(() => {});
+	t.end();
 });