From 0e91055bdfa4d3baef5c73c252c1d1c86dd12214 Mon Sep 17 00:00:00 2001 From: Jared Cuffe Date: Fri, 5 Mar 2021 20:10:13 -0800 Subject: [PATCH] Mocks new tool-cache methods. --- test/setup-terraform.test.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/setup-terraform.test.js b/test/setup-terraform.test.js index fa2fd337..24e0190c 100644 --- a/test/setup-terraform.test.js +++ b/test/setup-terraform.test.js @@ -564,6 +564,13 @@ describe('Setup Terraform', () => { .fn() .mockReturnValueOnce('file'); + tc.cacheDir = jest.fn() + .mockReturnValueOnce('file'); + + tc.find = jest + .fn() + .mockReturnValueOnce(null); + os.platform = jest .fn() .mockReturnValue('linux'); @@ -608,6 +615,13 @@ describe('Setup Terraform', () => { .fn() .mockReturnValueOnce('file'); + tc.cacheDir = jest.fn() + .mockReturnValueOnce('file'); + + tc.find = jest + .fn() + .mockReturnValueOnce(null); + os.platform = jest .fn() .mockReturnValue('win32');