web
web copied to clipboard
mergeConfigs should merge objects recursively
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.
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.