From fae26d65ac0cdebfde5a86fea6698ffaeb617530 Mon Sep 17 00:00:00 2001 From: Opender Singh Date: Fri, 29 May 2020 10:45:37 +1200 Subject: [PATCH] Fix windows tests (#2227) --- .github/workflows/test.yml | 10 +++++++++- .../app/sync/git/__tests__/mem-plugin.test.js | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 49e5559e64..a68b9f866c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,14 @@ name: Test -on: [push, pull_request] +on: + push: + branches: + - develop + - master + pull_request: + types: + - opened + - synchronize env: NPM_CONFIG_TARGET: 3.1.13 diff --git a/packages/insomnia-app/app/sync/git/__tests__/mem-plugin.test.js b/packages/insomnia-app/app/sync/git/__tests__/mem-plugin.test.js index 68cef4392a..fb33036d51 100644 --- a/packages/insomnia-app/app/sync/git/__tests__/mem-plugin.test.js +++ b/packages/insomnia-app/app/sync/git/__tests__/mem-plugin.test.js @@ -2,9 +2,12 @@ import { assertAsyncError, setupDateMocks } from './util'; import { MemPlugin } from '../mem-plugin'; import path from 'path'; import { GIT_CLONE_DIR } from '../git-vcs'; +import { isWindows } from '../../../common/constants'; jest.mock('path'); -describe.each(['win32', 'posix'])('Memlugin using path.%s', type => { +const paths = isWindows() ? ['win32'] : ['win32', 'posix']; + +describe.each([paths])('Memlugin using path.%s', type => { beforeAll(() => path.__mockPath(type)); afterAll(() => jest.restoreAllMocks()); beforeEach(setupDateMocks);