File: replace-ava-by-jest.patch

package info (click to toggle)
node-get-stdin 8.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 164 kB
  • sloc: javascript: 136; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 900 bytes parent folder | download | duplicates (3)
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
Description: replace ava by jest
Author: Xavier Guimard <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2020-12-01

--- /dev/null
+++ b/babel.config.json
@@ -0,0 +1 @@
+{"presets":["@babel/preset-env"],"plugins":["@babel/plugin-transform-runtime"]}
--- a/test.js
+++ b/test.js
@@ -1,8 +1,7 @@
-import {serial as test} from 'ava';
 import delay from 'delay';
 import getStdin from '.';
 
-test('get stdin', async t => {
+test('get stdin', async () => {
 	process.stdin.isTTY = false;
 	const promise = getStdin();
 
@@ -11,10 +10,10 @@
 	await delay(1);
 	process.stdin.emit('end');
 
-	t.is((await promise).trim(), 'unicorns');
+	expect((await promise).trim()).toBe('unicorns');
 });
 
-test('get empty string when no stdin', async t => {
+test('get empty string when no stdin', async () => {
 	process.stdin.isTTY = true;
-	t.is(await getStdin(), '');
+	expect(await getStdin()).toBe('');
 });