Skip to content

Commit cfd16b6

Browse files
committed
update setConfigFilePath
1 parent 1d7cfc4 commit cfd16b6

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

packages/data-context/src/data/ProjectLifecycleManager.ts

+5-10
Original file line numberDiff line numberDiff line change
@@ -1120,18 +1120,13 @@ export class ProjectLifecycleManager {
11201120
}
11211121

11221122
setConfigFilePath (lang: 'ts' | 'js') {
1123-
switch (lang) {
1124-
case 'ts':
1125-
this._configFilePath = this._pathToFile('cypress.config.ts')
1126-
break
1123+
if (lang === 'ts') {
1124+
this._configFilePath = this._pathToFile('cypress.config.ts')
11271125

1128-
case 'js':
1129-
this._configFilePath = this._pathToFile('cypress.config.js')
1130-
break
1131-
1132-
default:
1133-
throw new Error('Unreachable')
1126+
return
11341127
}
1128+
1129+
this._configFilePath = this._pathToFile('cypress.config.js')
11351130
}
11361131

11371132
private _pathToFile (file: string) {

0 commit comments

Comments
 (0)