File: replace-ava-by-tape.patch

package info (click to toggle)
node-npm-run-path 5.1.0%2B~4.0.0-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 240 kB
  • sloc: javascript: 112; makefile: 3
file content (60 lines) | stat: -rw-r--r-- 1,642 bytes parent folder | 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
60
Description: replace ava by tape
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2022-03-31

--- a/test.js
+++ b/test.js
@@ -1,7 +1,7 @@
 import process from 'node:process';
 import path from 'node:path';
 import {fileURLToPath} from 'node:url';
-import test from 'ava';
+import test from 'tape';
 import {npmRunPath, npmRunPathEnv} from './index.js';
 
 const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -16,6 +16,7 @@
 		npmRunPathEnv({env: {PATH: 'foo'}}).PATH.split(path.delimiter)[0],
 		path.join(__dirname, 'node_modules/.bin'),
 	);
+	t.end();
 });
 
 test('the `cwd` option changes the current directory', t => {
@@ -23,6 +24,7 @@
 		npmRunPath({path: '', cwd: '/dir'}).split(path.delimiter)[0],
 		path.normalize('/dir/node_modules/.bin'),
 	);
+	t.end();
 });
 
 test('the `cwd` option can be a file URL', t => {
@@ -30,11 +32,13 @@
 		npmRunPath({path: '', cwd: new URL('file:///dir')}).split(path.delimiter)[0],
 		path.normalize('/dir/node_modules/.bin'),
 	);
+	t.end();
 });
 
 test('push `execPath` later in the PATH', t => {
 	const pathEnv = npmRunPath({path: ''}).split(path.delimiter);
 	t.is(pathEnv[pathEnv.length - 2], path.dirname(process.execPath));
+	t.end();
 });
 
 test('can change `execPath` with the `execPath` option', t => {
@@ -42,6 +46,7 @@
 		path.delimiter,
 	);
 	t.is(pathEnv[pathEnv.length - 2], path.resolve(process.cwd(), 'test'));
+	t.end();
 });
 
 test('the `execPath` option is relative to the `cwd` option', t => {
@@ -51,4 +56,5 @@
 		cwd: '/dir',
 	}).split(path.delimiter);
 	t.is(pathEnv[pathEnv.length - 2], path.normalize('/dir/test'));
+	t.end();
 });