File: replace-ava-by-tape.diff

package info (click to toggle)
node-load-json-file 7.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156 kB
  • sloc: javascript: 93; makefile: 4
file content (42 lines) | stat: -rw-r--r-- 1,024 bytes parent folder | download | duplicates (2)
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
Description: replace ava by tape in test
Author: Xavier Guimard <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2022-04-09

--- a/test.js
+++ b/test.js
@@ -1,6 +1,6 @@
 import path from 'node:path';
 import {fileURLToPath} from 'node:url';
-import test from 'ava';
+import test from 'tape';
 import {loadJsonFile, loadJsonFileSync} from './index.js';
 
 const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -9,10 +9,12 @@
 test('async', async t => {
 	const data = await loadJsonFile(fixture);
 	t.is(data.name, 'load-json-file');
+	t.end();
 });
 
 test('sync', t => {
 	t.is(loadJsonFileSync(fixture).name, 'load-json-file');
+	t.end();
 });
 
 test('beforeParse option', async t => {
@@ -20,6 +22,7 @@
 		beforeParse: string => string.replace('"name": "load-json-file"', '"name": "foo"'),
 	});
 	t.is(data.name, 'foo');
+	t.end();
 });
 
 test('reviver option', async t => {
@@ -27,4 +30,5 @@
 		reviver: (key, value) => key === 'name' ? 'foo' : value,
 	});
 	t.is(data.name, 'foo');
+	t.end();
 });