mirror of
https://github.com/actions/setup-python.git
synced 2025-04-21 22:38:43 +00:00
Hide mock implementation
This commit is contained in:
parent
116ddb08f5
commit
a743c858bf
1 changed files with 3 additions and 4 deletions
|
@ -114,18 +114,17 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
|||
dependencyFile
|
||||
);
|
||||
|
||||
computeKeysSpy.mockImplementation(() => Promise.resolve('Ubuntu-20.4'));
|
||||
|
||||
if (process.env['RUNNER_OS']?.toLowerCase() === 'linux') {
|
||||
computeKeysSpy.mockImplementation(() => Promise.resolve('Ubuntu-20.4'));
|
||||
Object.defineProperty(utils, 'IS_LINUX', {
|
||||
value: () => {
|
||||
jest.fn().mockReturnValue(true);
|
||||
jest.fn().mockImplementation(() => true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Object.defineProperty(utils, 'IS_LINUX', {
|
||||
value: () => {
|
||||
jest.fn().mockReturnValue(false);
|
||||
jest.fn().mockReturnValue(() => false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue