File: replace-ava-by-tape.diff

package info (click to toggle)
node-cli-cursor 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 132 kB
  • sloc: makefile: 2
file content (64 lines) | stat: -rw-r--r-- 1,411 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
61
62
63
64
Description: replace ava by tape for test
Author: Xavier Guimard <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2020-04-29

--- a/test.js
+++ b/test.js
@@ -1,6 +1,6 @@
-import childProcess from 'child_process';
-import test from 'ava';
-import cliCursor from '.';
+const childProcess = require('child_process');
+const test = require('tape');
+const cliCursor = require('.');
 
 const {stderr: {write}} = process;
 const SHOW = '\u001B[?25h';
@@ -23,38 +23,46 @@
 
 test('show', t => {
 	t.is(getStderr(cliCursor.show), SHOW);
+    t.end();
 });
 
 test('hide', t => {
 	t.is(getStderr(cliCursor.hide), HIDE);
+    t.end();
 });
 
 test('toggle', t => {
 	cliCursor.hide();
 	t.is(getStderr(cliCursor.toggle), SHOW);
+    t.end();
 });
 
 test('toggle 2', t => {
 	cliCursor.show();
 	t.is(getStderr(cliCursor.toggle), HIDE);
+    t.end();
 });
 
 test('toggle force', t => {
 	cliCursor.show();
 	t.is(getStderr(cliCursor.toggle.bind(null, true)), SHOW);
+    t.end();
 });
 
 test('toggle force 2', t => {
 	cliCursor.hide();
 	t.is(getStderr(cliCursor.toggle.bind(null, true)), SHOW);
+    t.end();
 });
 
 test('toggle force 3', t => {
 	cliCursor.show();
 	t.is(getStderr(cliCursor.toggle.bind(null, false)), HIDE);
+    t.end();
 });
 
 // Used to fail, see sindresorhus/log-update#2
 test('require', t => {
 	t.is(childProcess.execSync('node index.js', {encoding: 'utf8'}), '');
+    t.end();
 });