Ava: Ensure ava.config.js export does not contain an "ava" property

Created on 30 Sep 2018  路  2Comments  路  Source: avajs/ava

ava.config.js files should include the AVA configuration, without wrapping it inside an AVA field. In other words, this is wrong:

export default {
  ava: {
  }
}

To prevent confusion, we should check if the configuration has an ava key and throw an error.

I realize the documentation is confusing, since we're not consistent in whether we're showing a partial package.json, but this will at least help nudge in the right direction.

The config is loaded in this file: https://github.com/avajs/ava/blob/master/lib/load-config.js

enhancement good for beginner help wanted

All 2 comments

I'll pick this up tomorrow. Planning to use AVA for a long time, may as well get to know it's inner workings :)

@wmik would you like to create a PR?

Was this page helpful?
0 / 5 - 0 ratings