|
1 |
| -exports[ |
2 |
| - 'commit-message-install getCommand removes --file and its argument 1' |
3 |
| -] = { |
4 |
| - args: ['--file', 'file.txt', 'echo', 'foo', 'bar'], |
5 |
| - command: 'echo foo bar' |
| 1 | +exports['commit-message-install getCommand removes --file and its argument 1'] = { |
| 2 | + "args": [ |
| 3 | + "--file", |
| 4 | + "file.txt", |
| 5 | + "echo", |
| 6 | + "foo", |
| 7 | + "bar" |
| 8 | + ], |
| 9 | + "command": "echo foo bar" |
6 | 10 | }
|
7 | 11 |
|
8 | 12 | exports['commit-message-install getCommand removes -f and its argument 1'] = {
|
9 |
| - args: ['-f', 'file.txt', 'echo', 'foo', 'bar'], |
10 |
| - command: 'echo foo bar' |
| 13 | + "args": [ |
| 14 | + "-f", |
| 15 | + "file.txt", |
| 16 | + "echo", |
| 17 | + "foo", |
| 18 | + "bar" |
| 19 | + ], |
| 20 | + "command": "echo foo bar" |
11 | 21 | }
|
12 | 22 |
|
13 |
| -exports[ |
14 |
| - 'commit-message-install getCommand returns original command from array 1' |
15 |
| -] = { |
16 |
| - args: ['echo', 'foo', 'bar'], |
17 |
| - command: 'echo foo bar' |
| 23 | +exports['commit-message-install getCommand returns original command from array 1'] = { |
| 24 | + "args": [ |
| 25 | + "echo", |
| 26 | + "foo", |
| 27 | + "bar" |
| 28 | + ], |
| 29 | + "command": "echo foo bar" |
18 | 30 | }
|
19 | 31 |
|
20 | 32 | exports['commit-message-install getJsonBlock finds single json block 1'] = {
|
21 |
| - foo: 'bar' |
| 33 | + "foo": "bar" |
22 | 34 | }
|
23 | 35 |
|
24 |
| -exports[ |
25 |
| - 'commit-message-install getJsonBlock finds single json block at start 1' |
26 |
| -] = { |
27 |
| - foo: 'bar' |
| 36 | +exports['commit-message-install getJsonBlock finds single json block at start 1'] = { |
| 37 | + "foo": "bar" |
28 | 38 | }
|
29 | 39 |
|
30 |
| -exports[ |
31 |
| - 'commit-message-install getJsonBlock returns first found json block 1' |
32 |
| -] = { |
33 |
| - foo: 'bar' |
| 40 | +exports['commit-message-install getJsonBlock returns first found json block 1'] = { |
| 41 | + "foo": "bar" |
34 | 42 | }
|
35 | 43 |
|
36 | 44 | exports['commit-message-install getJsonBlock returns json with branch 1'] = {
|
37 |
| - foo: 'bar', |
38 |
| - branch: 'test-branch' |
| 45 | + "foo": "bar", |
| 46 | + "branch": "test-branch" |
39 | 47 | }
|
40 | 48 |
|
41 |
| -exports[ |
42 |
| - 'commit-message-install getJsonFromGit extracts the json from git message 1' |
43 |
| -] = { |
44 |
| - platform: 'win32', |
45 |
| - branch: 'some-branch' |
| 49 | +exports['commit-message-install getJsonFromGit extracts the json from git message 1'] = { |
| 50 | + "platform": "win32", |
| 51 | + "branch": "some-branch" |
46 | 52 | }
|
47 | 53 |
|
48 |
| -exports[ |
49 |
| - 'commit-message-install gets commit message for specific commit returns just the body of specific commit 1' |
50 |
| -] = ` |
| 54 | +exports['commit-message-install gets commit message for specific commit returns just the body of specific commit 1'] = ` |
51 | 55 | message body
|
52 | 56 | `
|
53 | 57 |
|
54 |
| -exports[ |
55 |
| - 'commit-message-install gets last commit message returns just the body of the commit message 1' |
56 |
| -] = ` |
| 58 | +exports['commit-message-install gets last commit message returns just the body of the commit message 1'] = ` |
57 | 59 | message body
|
58 | 60 | `
|
59 | 61 |
|
60 |
| -exports[ |
61 |
| - 'commit-message-install isPlatformAllowed compares platforms isPlatformAllowed 1' |
62 |
| -] = { |
63 |
| - name: 'isPlatformAllowed', |
64 |
| - behavior: [ |
| 62 | +exports['commit-message-install isArchAllowed compares arch isArchAllowed 1'] = { |
| 63 | + "name": "isArchAllowed", |
| 64 | + "behavior": [ |
65 | 65 | {
|
66 |
| - given: ['win32', 'win32'], |
67 |
| - expect: true |
| 66 | + "given": [ |
| 67 | + "x64", |
| 68 | + "x64" |
| 69 | + ], |
| 70 | + "expect": true |
68 | 71 | },
|
69 | 72 | {
|
70 |
| - given: ['win32', 'linux'], |
71 |
| - expect: false |
| 73 | + "given": [ |
| 74 | + null, |
| 75 | + "x64" |
| 76 | + ], |
| 77 | + "expect": true |
72 | 78 | },
|
73 | 79 | {
|
74 |
| - given: ['*', 'linux'], |
75 |
| - expect: true |
| 80 | + "given": [ |
| 81 | + "*", |
| 82 | + "x64" |
| 83 | + ], |
| 84 | + "expect": true |
76 | 85 | },
|
77 | 86 | {
|
78 |
| - given: ['win32,linux', 'linux'], |
79 |
| - expect: true |
| 87 | + "given": [ |
| 88 | + null, |
| 89 | + null |
| 90 | + ], |
| 91 | + "expect": true |
80 | 92 | },
|
81 | 93 | {
|
82 |
| - given: ['win32|linux', 'linux'], |
83 |
| - expect: true |
| 94 | + "given": [ |
| 95 | + "ia32,x64", |
| 96 | + "ia32" |
| 97 | + ], |
| 98 | + "expect": true |
84 | 99 | },
|
85 | 100 | {
|
86 |
| - given: ['win32, linux', 'linux'], |
87 |
| - expect: true |
| 101 | + "given": [ |
| 102 | + "ia32,x64", |
| 103 | + "x64" |
| 104 | + ], |
| 105 | + "expect": true |
| 106 | + }, |
| 107 | + { |
| 108 | + "given": [ |
| 109 | + "ia32,x64", |
| 110 | + null |
| 111 | + ], |
| 112 | + "expect": true |
| 113 | + }, |
| 114 | + { |
| 115 | + "given": [ |
| 116 | + "ia32", |
| 117 | + "x64" |
| 118 | + ], |
| 119 | + "expect": false |
| 120 | + }, |
| 121 | + { |
| 122 | + "given": [ |
| 123 | + "x64", |
| 124 | + "ia32" |
| 125 | + ], |
| 126 | + "expect": false |
| 127 | + } |
| 128 | + ] |
| 129 | +} |
| 130 | + |
| 131 | +exports['commit-message-install isPlatformAllowed compares platforms isPlatformAllowed 1'] = { |
| 132 | + "name": "isPlatformAllowed", |
| 133 | + "behavior": [ |
| 134 | + { |
| 135 | + "given": [ |
| 136 | + "win32", |
| 137 | + "win32" |
| 138 | + ], |
| 139 | + "expect": true |
| 140 | + }, |
| 141 | + { |
| 142 | + "given": [ |
| 143 | + "win32", |
| 144 | + "linux" |
| 145 | + ], |
| 146 | + "expect": false |
| 147 | + }, |
| 148 | + { |
| 149 | + "given": [ |
| 150 | + "*", |
| 151 | + "linux" |
| 152 | + ], |
| 153 | + "expect": true |
| 154 | + }, |
| 155 | + { |
| 156 | + "given": [ |
| 157 | + "win32,linux", |
| 158 | + "linux" |
| 159 | + ], |
| 160 | + "expect": true |
| 161 | + }, |
| 162 | + { |
| 163 | + "given": [ |
| 164 | + "win32|linux", |
| 165 | + "linux" |
| 166 | + ], |
| 167 | + "expect": true |
| 168 | + }, |
| 169 | + { |
| 170 | + "given": [ |
| 171 | + "win32, linux", |
| 172 | + "linux" |
| 173 | + ], |
| 174 | + "expect": true |
88 | 175 | }
|
89 | 176 | ]
|
90 | 177 | }
|
91 | 178 |
|
92 | 179 | exports['formed json object'] = {
|
93 |
| - platform: 'linux', |
94 |
| - arch: 'x64', |
95 |
| - env: {}, |
96 |
| - packages: 'debug chalk', |
97 |
| - status: { |
98 |
| - owner: 'foo', |
99 |
| - repo: 'bar', |
100 |
| - sha: '2d8687c143165218c6b52a76018b76cf99137e48' |
| 180 | + "platform": "linux", |
| 181 | + "arch": "x64", |
| 182 | + "env": {}, |
| 183 | + "packages": "debug chalk", |
| 184 | + "status": { |
| 185 | + "owner": "foo", |
| 186 | + "repo": "bar", |
| 187 | + "sha": "2d8687c143165218c6b52a76018b76cf99137e48" |
101 | 188 | }
|
102 | 189 | }
|
103 | 190 |
|
104 | 191 | exports['parsed back message'] = {
|
105 |
| - platform: 'linux', |
106 |
| - arch: 'x64', |
107 |
| - env: {}, |
108 |
| - packages: 'debug chalk', |
109 |
| - status: { |
110 |
| - owner: 'foo', |
111 |
| - repo: 'bar', |
112 |
| - sha: '2d8687c143165218c6b52a76018b76cf99137e48' |
| 192 | + "platform": "linux", |
| 193 | + "arch": "x64", |
| 194 | + "env": {}, |
| 195 | + "packages": "debug chalk", |
| 196 | + "status": { |
| 197 | + "owner": "foo", |
| 198 | + "repo": "bar", |
| 199 | + "sha": "2d8687c143165218c6b52a76018b76cf99137e48" |
113 | 200 | }
|
114 | 201 | }
|
0 commit comments