From cfc3d6657b2de1eca7e142c28643a48a2a5a481c Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Sat, 18 Jan 2020 01:19:37 +0000 Subject: [PATCH] test: Add remove working files --- __tests__/main.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index fdc40fb..c8f8d8f 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -1,4 +1,6 @@ import * as main from '../src/main'; +import * as io from '@actions/io'; +import path from 'path'; import nock from 'nock'; // import {FetchError} from 'node-fetch'; import jsonTestBrew from './data/brew.json'; @@ -17,6 +19,10 @@ afterEach(() => { }); describe('Integration testing run()', () => { + afterEach(async () => { + await io.rmRF(path.join(`${process.env.HOME}`, 'tmp')); + }); + test('succeed in installing a custom version', async () => { const testVersion = '0.61.0'; process.env['INPUT_HUGO-VERSION'] = testVersion;