-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: correct unit tests and e2e tests for language service #1579
Conversation
@@ -172,8 +170,7 @@ export const initializeLanguageServiceInstance = ( | |||
* test file for 1st time run after clearing cache because | |||
*/ | |||
return ( | |||
entry[1].modulePaths.find(modulePath => modulePath === fileName) && | |||
!hasOwn.call(memoryCache.files, entry[0]) | |||
entry[1].modulePaths.find(modulePath => modulePath === fileName) && !memoryCache.files.has(entry[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified our internal memory cache in #1574 but forgot this one. It doesn't cause any bugs or performance issue but 'the fastest code is the code which does nothing' so it's better to correct this condition.
logTarget.clear() | ||
compiler.compile(importedModuleSrc, require.resolve('../__mocks__/unchanged-modules/main.ts')) | ||
|
||
expect(logTarget.filteredLines(LogLevels.debug, Infinity)).toMatchInlineSnapshot(` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just need to verify logging for assertion related to https://github.com/kulshekhar/ts-jest/pull/1579/files#diff-124008e76d6a710666b8d995ffc3758fR173 (the condition which is fixed in the below comment)
Pull Request Test Coverage Report for Build 4613
💛 - Coveralls |
Summary
Added unit tests for
language-service.ts
and remove unnecessary e2e tests.Test plan
Green CI
Does this PR introduce a breaking change?
Other information
N.A.