From dd324cc0e98ac26a02395cf2fd6b7d1098d4ae20 Mon Sep 17 00:00:00 2001 From: Thomas Boop Date: Tue, 29 Sep 2020 18:52:27 -0400 Subject: [PATCH] disable workflow commands when running in a runner --- __tests__/find-ruby.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/__tests__/find-ruby.test.ts b/__tests__/find-ruby.test.ts index 1d59d6c..0b3301d 100644 --- a/__tests__/find-ruby.test.ts +++ b/__tests__/find-ruby.test.ts @@ -12,7 +12,8 @@ describe('find-ruby', () => { let cnSpy: jest.SpyInstance; beforeAll(async () => { - process.env['GITHUB_PATH'] = ''; + process.env['GITHUB_PATH'] = ''; // Stub out ENV file functionality so we can verify it writes to standard out + console.log("::stop-commands::stoptoken"); // Disable executing of runner commands when running tests in actions }); beforeEach(() => { @@ -31,7 +32,9 @@ describe('find-ruby', () => { jest.clearAllMocks(); }); - afterAll(async () => {}, 100000); + afterAll(async () => { + console.log("::stoptoken::"); // Re-enable executing of runner commands when running tests in actions + }, 100000); it('finds a version of ruby already in the cache', async () => { let toolPath = path.normalize('/cache/ruby/2.7.0/x64');