File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,21 +163,16 @@ describe("LintResultCache", () => {
163163 it ( "contains node version during hashing" , ( ) => {
164164 const version = "node-=-version" ;
165165
166- const versionStub = sandbox . stub ( process , "version" ) . value ( version ) ;
167-
168- try {
169- const NewLintResultCache = proxyquire ( "../../../lib/cli-engine/lint-result-cache.js" , {
170- "./hash" : hashStub
171- } ) ;
172- const newLintResultCache = new NewLintResultCache ( cacheFileLocation , "metadata" ) ;
166+ sandbox . stub ( process , "version" ) . value ( version ) ;
167+ const NewLintResultCache = proxyquire ( "../../../lib/cli-engine/lint-result-cache.js" , {
168+ "./hash" : hashStub
169+ } ) ;
170+ const newLintResultCache = new NewLintResultCache ( cacheFileLocation , "metadata" ) ;
173171
174- newLintResultCache . getCachedLintResults ( filePath , fakeConfig ) ;
172+ newLintResultCache . getCachedLintResults ( filePath , fakeConfig ) ;
175173
176- assert . ok ( hashStub . calledOnce ) ;
177- assert . ok ( hashStub . calledWithMatch ( version ) ) ;
178- } finally {
179- versionStub . restore ( ) ;
180- }
174+ assert . ok ( hashStub . calledOnce ) ;
175+ assert . ok ( hashStub . calledWithMatch ( version ) ) ;
181176 } ) ;
182177 } ) ;
183178
You can’t perform that action at this time.
0 commit comments