From 23453bb13e8edd6883ff2dc6ab7528ae0017e78f Mon Sep 17 00:00:00 2001 From: Edoardo Scibona <12040076+velut@users.noreply.github.com> Date: Mon, 17 Jan 2022 14:58:06 +0100 Subject: [PATCH] test: fix mock warining from ts-jest See https://github.com/facebook/jest/pull/12089 --- package.json | 1 - test/package-analyzer/analyze-registry-package.test.ts | 5 ++--- yarn.lock | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3a0d0fd1..208a1dfe 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,6 @@ "np": "7.6.0", "setup-polly-jest": "0.10.0", "ts-dedent": "2.2.0", - "ts-jest": "27.1.3", "ts-node": "10.4.0", "tslib": "2.3.1", "typescript": "4.5.4" diff --git a/test/package-analyzer/analyze-registry-package.test.ts b/test/package-analyzer/analyze-registry-package.test.ts index 3e38ca80..6a881814 100644 --- a/test/package-analyzer/analyze-registry-package.test.ts +++ b/test/package-analyzer/analyze-registry-package.test.ts @@ -5,7 +5,6 @@ import NodeHttpAdapter from '@pollyjs/adapter-node-http'; import FSPersister from '@pollyjs/persister-fs'; import * as path from 'path'; import { setupPolly } from 'setup-polly-jest'; -import { mocked } from 'ts-jest/utils'; import * as tsm from 'ts-morph'; import { analyzeRegistryPackage } from '../../src'; import { extractPackageAPI } from '../../src/api-extractor/extract-package-api'; @@ -19,8 +18,8 @@ jest.mock('../../src/api-extractor/extract-package-api', () => ({ extractPackageAPI: jest.fn(), })); -const mockedTryDownloadPackage = mocked(tryDownloadPackage, true); -const mockedExtractPackageAPI = mocked(extractPackageAPI, true); +const mockedTryDownloadPackage = jest.mocked(tryDownloadPackage, true); +const mockedExtractPackageAPI = jest.mocked(extractPackageAPI, true); // See https://github.com/gribnoysup/setup-polly-jest/issues/23#issuecomment-890494186 // Polly.register(NodeHttpAdapter); diff --git a/yarn.lock b/yarn.lock index 76d9736f..0ad70b78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10674,7 +10674,7 @@ ts-dedent@2.2.0: resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5" integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ== -ts-jest@27.1.3, ts-jest@^27.1.2: +ts-jest@^27.1.2: version "27.1.3" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.3.tgz#1f723e7e74027c4da92c0ffbd73287e8af2b2957" integrity sha512-6Nlura7s6uM9BVUAoqLH7JHyMXjz8gluryjpPXxr3IxZdAXnU6FhjvVLHFtfd1vsE1p8zD1OJfskkc0jhTSnkA==