Skip to content

Commit 49f430f

Browse files
committed
Support legacy default "pathToJest" setting
1 parent 6b0c901 commit 49f430f

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/Settings/index.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ describe('isDefaultPathToJest', () => {
66
expect(isDefaultPathToJest(null)).toBe(true)
77
})
88

9+
it('returns true for the legacy default ""', () => {
10+
expect(isDefaultPathToJest('')).toBe(true)
11+
})
12+
913
it('returns false otherwise', () => {
1014
expect(isDefaultPathToJest('')).toBe(false)
1115
})

src/Settings/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface IPluginSettings {
1919
}
2020

2121
export function isDefaultPathToJest(str) {
22-
return str === null
22+
return str === null || str === ''
2323
}
2424

2525
export function hasUserSetPathToJest(str) {

0 commit comments

Comments
 (0)