hbenl / vscode-mocha-test-adapter

Mocha Test Adapter for the VS Code Test Explorer
MIT License
91 stars 31 forks source link

Support for the `extends` Config #242

Open manuth opened 1 year ago

manuth commented 1 year ago

Currently, mochas import("mocha/lib/cli/options").loadOptions function does not respect the extends setting.

Rather, config inheritance is handled separately in mocha/lib/cli/cli: https://github.com/mochajs/mocha/blob/37deed262d4bc0788d32c66636495d10038ad398/lib/cli/cli.js#L49-L79

Notice the import("yargs").config() call in the linked snippet.

To address this issue, changes to loadConfig have been made to replicate mochas behavior: https://github.com/manuth/vscode-mocha-test-adapter/blob/aa7ec47884ffb8c82885ee7c1942bbecd6596056/src/worker/loadConfig.ts#L4-L12

Changes made in this PR will fix #223