jest: no need to clear mock for integration tests

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-06-17 22:04:28 +02:00
parent 7b876a9e95
commit 5c3fc146af
4 changed files with 3 additions and 16 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
import {beforeEach, describe, expect, it, jest, test} from '@jest/globals';
import {describe, expect, it, test} from '@jest/globals';
import fs from 'fs';
import * as path from 'path';
@@ -32,10 +32,6 @@ const tmpDir = path.join(process.env.TEMP || '/tmp', 'github-jest');
const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
beforeEach(() => {
jest.clearAllMocks();
});
maybe('uploadArtifact', () => {
it('uploads an artifact', async () => {
const res = await GitHub.uploadArtifact({