Skip to content

Commit

Permalink
test(typings): repalce jest.SpyInstance with MockInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
huafu committed Oct 6, 2018
1 parent 6cacbea commit b837acd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/compiler.spec.ts
Expand Up @@ -128,7 +128,7 @@ Array [

describe('isolatedModules', () => {
const compiler = makeCompiler({ tsJestConfig: { isolatedModules: true, tsConfig: false } })
const spy: jest.SpyInstance = jest.spyOn(require('typescript'), 'transpileModule')
const spy = jest.spyOn(require('typescript'), 'transpileModule')
afterAll(() => {
spy.mockRestore()
})
Expand Down
6 changes: 3 additions & 3 deletions src/config/config-set.spec.ts
Expand Up @@ -361,9 +361,9 @@ describe('resolvePath', () => {
}) // resolvePath

describe('readTsConfig', () => {
let findConfig!: jest.SpyInstance<typeof ts.findConfigFile>
let readConfig!: jest.SpyInstance<typeof ts.readConfigFile>
let parseConfig!: jest.SpyInstance<typeof ts.parseJsonSourceFileConfigFileContent>
let findConfig!: jest.MockInstance<typeof ts.findConfigFile>
let readConfig!: jest.MockInstance<typeof ts.readConfigFile>
let parseConfig!: jest.MockInstance<typeof ts.parseJsonSourceFileConfigFileContent>
let cs!: ConfigSet
beforeAll(() => {
findConfig = jest.spyOn(ts, 'findConfigFile')
Expand Down

0 comments on commit b837acd

Please sign in to comment.