Skip to content

Commit

Permalink
Merge pull request codeceptjs#2750 from elaichenkov/feature/add-aibil…
Browse files Browse the repository at this point in the history
…ity-to-run-ts-config

feature(config): add ability to run ts config file
  • Loading branch information
Georgegriff authored Jan 29, 2021
2 parents 42fcda7 + 1800804 commit ca8d6b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ class Config {
return loadConfigFile(jsonConfig);
}

throw new Error(`Can not load config from ${jsConfig} or ${jsonConfig}\nCodeceptJS is not initialized in this dir. Execute 'codeceptjs init' to start`);
const tsConfig = path.join(configFile, 'codecept.conf.ts');
if (isFile(tsConfig)) {
return loadConfigFile(tsConfig);
}

throw new Error(`Can not load config from ${jsConfig} or ${jsonConfig} or ${tsConfig}\nCodeceptJS is not initialized in this dir. Execute 'codeceptjs init' to start`);
}

/**
Expand Down

0 comments on commit ca8d6b3

Please sign in to comment.