Skip to content
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

feat(config): remove legacy dash props #3371

Merged
merged 1 commit into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions detox/src/configuration/composeRunnerConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* @param {Detox.DetoxConfigurationOverrides} localConfig
*/
function composeRunnerConfig({ globalConfig, cliConfig }) {
const testRunner = globalConfig.testRunner || globalConfig['test-runner'] || 'jest';
const customRunnerConfig = cliConfig.runnerConfig || globalConfig.runnerConfig || globalConfig['runner-config'];
const testRunner = globalConfig.testRunner || 'jest';
const customRunnerConfig = cliConfig.runnerConfig || globalConfig.runnerConfig;

return {
testRunner,
Expand Down
12 changes: 0 additions & 12 deletions detox/src/configuration/composeRunnerConfig.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ describe('composeRunnerConfig', () => {
expect(composeRunnerConfig().testRunner).toBe('nyc jest');
});

it('should take .test-runner from globalConfig', () => {
globalConfig['test-runner'] = 'nyc jest';
expect(composeRunnerConfig().testRunner).toBe('nyc jest');
});

it('should set .testRunner to "jest" by default', () => {
expect(composeRunnerConfig().testRunner).toBe('jest');
});
Expand All @@ -41,13 +36,6 @@ describe('composeRunnerConfig', () => {
expect(composeRunnerConfig().runnerConfig).toBe('from/config.json');
});

it('should take .runner-config from config if it is not defined via CLI', () => {
globalConfig['runner-config'] = 'from/config.json';
delete cliConfig.runnerConfig;

expect(composeRunnerConfig().runnerConfig).toBe('from/config.json');
});

it('should set .runnerConfig to e2e/config.json by default', () => {
globalConfig.testRunner = 'jest';
expect(composeRunnerConfig().runnerConfig).toBe('e2e/config.json');
Expand Down