Skip to content
Permalink
Browse files

fix(compiler): only exclude test files when initializing compiler (#2062

)

Closes #2061
  • Loading branch information
ahnpnl committed Oct 26, 2020
1 parent 78502e1 commit 7264c137114b6dd895624e3476dd7ec57b64ee13
@@ -1,9 +1,13 @@
import $ from "jquery"

function foo() {
$.ajax<number>("/foo")
}

test("foo", () => {
test('foo', () => {
expect(2).toBe(2)
})

test('bar', () => {
const terminateReason: TerminatedReason = 'culled'

expect(terminateReason).toEqual('culled')
})
@@ -0,0 +1 @@
type TerminatedReason = 'culled' | 'died' | 'transferred'
@@ -75,7 +75,7 @@ export const initializeLanguageServiceInstance = (configs: ConfigSet, logger: Lo
}
// Initialize memory cache for typescript compiler
configs.parsedTsConfig.fileNames
.filter((fileName) => fileName.endsWith('.d.ts'))
.filter((fileName) => !configs.isTestFile(fileName))
.forEach((fileName) => {
memoryCache.files.set(fileName, {
version: 0,

0 comments on commit 7264c13

Please sign in to comment.
You can’t perform that action at this time.