Skip to content

Commit d36cf58

Browse files
committed
disable executing of commands during tests
1 parent 5590df7 commit d36cf58

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

__tests__/authutil.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ describe('authutil tests', () => {
2020
.toString(36)
2121
.substring(7)
2222
);
23-
process.env['GITHUB_ENV'] = ''; // Stub out ENV file functionality so we can verify it writes to standard out
23+
console.log('::stop-commands::stoptoken'); // Disable executing of runner commands when running tests in actions
24+
process.env['GITHUB_ENV'] = ''; // Stub out Environment file functionality so we can verify it writes to standard out (toolkit is backwards compatible)
2425
const tempDir = path.join(_runnerDir, randPath, 'temp');
2526
await io.rmRF(tempDir);
2627
await io.mkdirP(tempDir);
@@ -62,6 +63,7 @@ describe('authutil tests', () => {
6263
if (_runnerDir) {
6364
await io.rmRF(_runnerDir);
6465
}
66+
console.log('::stoptoken::'); // Re-enable executing of runner commands when running tests in actions
6567
}, 100000);
6668

6769
function readRcFile(rcFile: string) {

__tests__/installer.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ describe('setup-node', () => {
4242

4343
beforeEach(() => {
4444
// @actions/core
45+
console.log('::stop-commands::stoptoken'); // Disable executing of runner commands when running tests in actions
4546
process.env['GITHUB_PATH'] = ''; // Stub out ENV file functionality so we can verify it writes to standard out
4647
inputs = {};
4748
inSpy = jest.spyOn(core, 'getInput');
@@ -103,7 +104,9 @@ describe('setup-node', () => {
103104
//jest.restoreAllMocks();
104105
});
105106

106-
afterAll(async () => {}, 100000);
107+
afterAll(async () => {
108+
console.log('::stoptoken::'); // Re-enable executing of runner commands when running tests in actions
109+
}, 100000);
107110

108111
//--------------------------------------------------
109112
// Manifest find tests

0 commit comments

Comments
 (0)