Package: node-dargs / 7.0.0-3

replace-ava-by-tape.patch Patch series | 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Description: replace ava by tape
Author: Yadd <[email protected]>
Forwarded: not-needed
Last-Update: 2021-11-16

--- a/test.js
    b/test.js
@@ -1,5  1,5 @@
-import test from 'ava';
-import dargs from '.';
 const test = require('tape');
 const dargs = require('.');
 
 const fixture = {
 	_: ['some', 'option'],
@@ -35,14  35,17 @@
 		'-z',
 		'--camelCaseOpt' // Case unaffected for separated options
 	]);
 	t.end();
 });
 
 test('raises a TypeError if  \'_\' value is not an Array', t => {
 	t.throws(dargs.bind(dargs, {a: 'foo', _: 'baz'}), TypeError);
 	t.end();
 });
 
 test('raises a TypeError if  \'--\' value is not an Array', t => {
 	t.throws(dargs.bind(dargs, {a: 'foo', '--': 'baz'}), TypeError);
 	t.end();
 });
 
 test('useEquals options', t => {
@@ -72,6  75,7 @@
 		'-z',
 		'--camelCaseOpt'
 	]);
 	t.end();
 });
 
 test('exclude options', t => {
@@ -88,6  92,7 @@
 		'-z',
 		'--camelCaseOpt'
 	]);
 	t.end();
 });
 
 test('includes options', t => {
@@ -99,6  104,7 @@
 		'-e=bar',
 		'--camel-case-camel'
 	]);
 	t.end();
 });
 
 test('excludes and includes options', t => {
@@ -111,10  117,12 @@
 		'-e=bar',
 		'--camel-case-camel'
 	]);
 	t.end();
 });
 
 test('option to ignore false values', t => {
 	t.deepEqual(dargs({foo: false}, {ignoreFalse: true}), []);
 	t.end();
 });
 
 test('aliases option', t => {
@@ -125,6  133,7 @@
 		'-f',
 		'test'
 	]);
 	t.end();
 });
 
 test('includes and aliases options', t => {
@@ -140,6  149,7 @@
 		'-e=bar',
 		'--camel-case-camel'
 	]);
 	t.end();
 });
 
 test('camelCase option', t => {
@@ -163,6  173,7 @@
 		'-z',
 		'--camelCaseOpt'
 	]);
 	t.end();
 });
 
 test('shortFlag option', t => {
@@ -174,4  185,5 @@
 		'--foo=bar',
 		'--camel-case-camel'
 	]);
 	t.end();
 });