Codeceptjs: Switching to codecept.conf.js by default

Created on 14 Sep 2018  路  3Comments  路  Source: codeceptjs/CodeceptJS

We support .js and .json config formats. Originally JSON was chosen because of its simplicity: it's easy to write and easy to update. For instance, it was easy for generators (like page objects, or page fragments) to include the newly created objects into a config automatically.

However, .json does not provide the flexibility needed to build a complex system. That's why at some point we started to support .conf.js config.

The next idea is to switch from codecept.json in favor of codecept.conf.js for all new setups and provide a migration script (which should be very simple) to do the switch.

2.0

Most helpful comment

I agree. Using .js gives more flexibility building dynamic configurations.

All 3 comments

I agree. Using .js gives more flexibility building dynamic configurations.

Yes I agree. Again, json is good but .js is a widely used pattern across testing community for configuration management.

Good idea, our team use the .js config file with codeceptjs all the time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Schveitzer picture Schveitzer  路  3Comments

ybohaienko picture ybohaienko  路  4Comments

ecampii picture ecampii  路  3Comments

Isikiyski picture Isikiyski  路  4Comments

hanthomas picture hanthomas  路  4Comments