File: replace-ava-by-tape.diff

package info (click to toggle)
node-read-pkg 5.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,460 kB
  • sloc: javascript: 60; makefile: 2
file content (46 lines) | stat: -rw-r--r-- 1,035 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
43
44
45
46
Description: replace ava by tape
Author: Xavier Guimard <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2020-11-03

--- a/test/test.js
+++ b/test/test.js
@@ -1,7 +1,7 @@
 'use strict';
-import path from 'path';
-import test from 'ava';
-import readPackage from '..';
+const path = require('path');
+const test = require('tape');
+const readPackage = require('..');
 
 process.chdir(__dirname);
 
@@ -10,21 +10,25 @@
 test('async', async t => {
 	const package_ = await readPackage();
 	t.is(package_.name, 'unicorn');
-	t.truthy(package_._id);
+	t.ok(package_._id);
+	t.end();
 });
 
 test('async - cwd option', async t => {
 	const package_ = await readPackage({cwd: rootCwd});
 	t.is(package_.name, 'read-pkg');
+	t.end();
 });
 
 test('sync', t => {
 	const package_ = readPackage.sync();
 	t.is(package_.name, 'unicorn');
-	t.truthy(package_._id);
+	t.ok(package_._id);
+	t.end();
 });
 
 test('sync - cwd option', t => {
 	const package_ = readPackage.sync({cwd: rootCwd});
 	t.is(package_.name, 'read-pkg');
+	t.end();
 });