From 62ee24662cbe5b5803319a7ca3fdb707b19d0583 Mon Sep 17 00:00:00 2001 From: Ronan Jouchet Date: Wed, 2 Jun 2021 00:35:19 -0400 Subject: [PATCH] More test:watch fix: bring upgrade to Jest 27 from TheCleric' closed jest-ts PR See https://github.com/nativefier/nativefier/pull/1204 --- package.json | 6 +++--- src/options/optionsMain.test.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index e447cd3..ead63db 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "clean": "rimraf lib/ app/lib/ app/dist/", "clean:full": "rimraf lib/ app/lib/ app/dist/ app/node_modules/ node_modules/", "lint:fix": "eslint . --ext .ts --fix", - "lint:format": "prettier --write 'src/**/*.js' 'app/src/**/*.js'", + "lint:format": "prettier --write 'src/**/*.ts' 'app/src/**/*.ts'", "lint": "eslint . --ext .ts", "list-outdated-deps": "npm out; cd app && npm out; true", "prepare": "cd app && npm install && cd .. && npm run build", @@ -66,7 +66,7 @@ "yargs": "^17.0.1" }, "devDependencies": { - "@types/jest": "^26.0.20", + "@types/jest": "^26.0.23", "@types/ncp": "^2.0.4", "@types/node": "^12.12.6", "@types/page-icon": "^0.3.3", @@ -76,7 +76,7 @@ "eslint": "^7.10.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-prettier": "^3.3.1", - "jest": "^26.6.3", + "jest": "^27.0.3", "prettier": "^2.2.1", "rimraf": "^3.0.2", "ts-loader": "^9.2.1", diff --git a/src/options/optionsMain.test.ts b/src/options/optionsMain.test.ts index 3c103e1..b36139d 100644 --- a/src/options/optionsMain.test.ts +++ b/src/options/optionsMain.test.ts @@ -3,12 +3,12 @@ import * as asyncConfig from './asyncConfig'; import { inferPlatform } from '../infer/inferOs'; const mockedAsyncConfig = { some: 'options' }; -let asyncConfigMock: jasmine.Spy; +let asyncConfigMock: jest.SpyInstance; beforeAll(() => { - asyncConfigMock = spyOn(asyncConfig, 'asyncConfig').and.returnValue( - mockedAsyncConfig, - ); + asyncConfigMock = jest + .spyOn(asyncConfig, 'asyncConfig') + .mockResolvedValue(mockedAsyncConfig); }); test('it should call the async config', async () => {