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

mergeConfigs should merge objects recursively #2688

Open
DavidPeicho opened this issue Mar 29, 2024 · 1 comment
Open

mergeConfigs should merge objects recursively #2688

DavidPeicho opened this issue Mar 29, 2024 · 1 comment

Comments

@DavidPeicho
Copy link

Calling startTestRunner with this config:

startTestRunner({
    config: {
            testFramework: {
                config: {
                    grep: 'GrepSomething'
                },
            },
    },
});

would fail if another configuration down the line contain any testFramework parameters. It looks like mergeConfig should probably recursively merge objects, just like it does with arrays here.

@bashmish
Copy link
Member

bashmish commented Apr 2, 2024

Not sure if there was a specific reason to not do it like that? cc @thepassle @LarsDenBakker

Did you consider implementing or using 3rd party merge for your use-case? IIUC, both configs are in your code: one in the config file and one in the JS file where you invoke startTestRunner ?
It's often hard to define a single merge strategy that works for everyone, so if you can use smth custom for yourself, that can be a better strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants