|
2 | 2 | import {testEnv} from '@technote-space/github-action-test-helper';
|
3 | 3 | import {Utils} from '../src';
|
4 | 4 |
|
5 |
| -const {generateNewPatchVersion, generateNewMinorVersion, generateNewMajorVersion, arrayChunk, versionCompare, mask, isActionsStepDebug} = Utils; |
6 |
| -const {isBranch, isTagRef, normalizeRef, trimRef, getTag, getRefspec, getRemoteRefspec, getLocalRefspec, getOctokit, replaceVariables, isDebug} = Utils; |
| 5 | +const {generateNewPatchVersion, generateNewMinorVersion, generateNewMajorVersion, arrayChunk, versionCompare, isCommandDebug, isOutputDebug} = Utils; |
| 6 | +const {isBranch, isTagRef, normalizeRef, trimRef, getTag, getRefspec, getRemoteRefspec, getLocalRefspec, getOctokit, replaceVariables, mask} = Utils; |
7 | 7 |
|
8 | 8 | jest.useFakeTimers();
|
9 | 9 |
|
@@ -264,58 +264,58 @@ describe('replaceVariables', () => {
|
264 | 264 | });
|
265 | 265 | });
|
266 | 266 |
|
267 |
| -describe('isDebug', () => { |
| 267 | +describe('isCommandDebug', () => { |
268 | 268 | testEnv();
|
269 | 269 |
|
270 | 270 | it('should return true', () => {
|
271 |
| - process.env.ACTIONS_UTILS_DEBUG = 'true'; |
272 |
| - expect(isDebug()).toBe(true); |
| 271 | + process.env.INPUT_UTILS_COMMAND_DEBUG = 'true'; |
| 272 | + expect(isCommandDebug()).toBe(true); |
273 | 273 | });
|
274 | 274 |
|
275 | 275 | it('should return false 1', () => {
|
276 |
| - expect(isDebug()).toBe(false); |
| 276 | + expect(isCommandDebug()).toBe(false); |
277 | 277 | });
|
278 | 278 |
|
279 | 279 | it('should return false 2', () => {
|
280 |
| - process.env.ACTIONS_UTILS_DEBUG = ''; |
281 |
| - expect(isDebug()).toBe(false); |
| 280 | + process.env.INPUT_UTILS_COMMAND_DEBUG = ''; |
| 281 | + expect(isCommandDebug()).toBe(false); |
282 | 282 | });
|
283 | 283 |
|
284 | 284 | it('should return false 3', () => {
|
285 |
| - process.env.ACTIONS_UTILS_DEBUG = '1'; |
286 |
| - expect(isDebug()).toBe(false); |
| 285 | + process.env.INPUT_UTILS_COMMAND_DEBUG = '1'; |
| 286 | + expect(isCommandDebug()).toBe(false); |
287 | 287 | });
|
288 | 288 |
|
289 | 289 | it('should return false 4', () => {
|
290 |
| - process.env.ACTIONS_UTILS_DEBUG = 'abc'; |
291 |
| - expect(isDebug()).toBe(false); |
| 290 | + process.env.INPUT_UTILS_COMMAND_DEBUG = 'abc'; |
| 291 | + expect(isCommandDebug()).toBe(false); |
292 | 292 | });
|
293 | 293 | });
|
294 | 294 |
|
295 |
| -describe('isActionsStepDebug', () => { |
| 295 | +describe('isOutputDebug', () => { |
296 | 296 | testEnv();
|
297 | 297 |
|
298 | 298 | it('should return true', () => {
|
299 |
| - process.env.ACTIONS_STEP_DEBUG = 'true'; |
300 |
| - expect(isActionsStepDebug()).toBe(true); |
| 299 | + process.env.INPUT_UTILS_OUTPUT_DEBUG = 'true'; |
| 300 | + expect(isOutputDebug()).toBe(true); |
301 | 301 | });
|
302 | 302 |
|
303 | 303 | it('should return false 1', () => {
|
304 |
| - expect(isActionsStepDebug()).toBe(false); |
| 304 | + expect(isOutputDebug()).toBe(false); |
305 | 305 | });
|
306 | 306 |
|
307 | 307 | it('should return false 2', () => {
|
308 |
| - process.env.ACTIONS_STEP_DEBUG = ''; |
309 |
| - expect(isActionsStepDebug()).toBe(false); |
| 308 | + process.env.INPUT_UTILS_OUTPUT_DEBUG = ''; |
| 309 | + expect(isOutputDebug()).toBe(false); |
310 | 310 | });
|
311 | 311 |
|
312 | 312 | it('should return false 3', () => {
|
313 |
| - process.env.ACTIONS_STEP_DEBUG = '1'; |
314 |
| - expect(isActionsStepDebug()).toBe(false); |
| 313 | + process.env.INPUT_UTILS_OUTPUT_DEBUG = '1'; |
| 314 | + expect(isOutputDebug()).toBe(false); |
315 | 315 | });
|
316 | 316 |
|
317 | 317 | it('should return false 4', () => {
|
318 |
| - process.env.ACTIONS_STEP_DEBUG = 'abc'; |
319 |
| - expect(isActionsStepDebug()).toBe(false); |
| 318 | + process.env.INPUT_UTILS_OUTPUT_DEBUG = 'abc'; |
| 319 | + expect(isOutputDebug()).toBe(false); |
320 | 320 | });
|
321 | 321 | });
|
0 commit comments