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

Add a mostly hidden test.default that provides test #2836

Merged
merged 1 commit into from Sep 18, 2021
Merged

Conversation

novemberborn
Copy link
Member

Our type definition uses ESM syntax; when using CJS with VSCode, the auto-completion assumes the root is accessed through require('ava').default. Placate VSCode by adding a mostly hidden default property on the root. This is available through both CJS and ESM imports. We use a proxy so that we don't end up with root.default.default.default chains.

Fixes #2539.

Our type definition uses ESM syntax; when using CJS with VSCode, the
auto-completion assumes the root is accessed through `require('ava').default`.
Placate VSCode by adding a mostly hidden default property on the root. This is
available through both CJS and ESM imports. We use a proxy so that we don't end
up with root.default.default.default chains.

Fixes #2539.
novemberborn added a commit to avajs/eslint-plugin-ava that referenced this pull request Sep 18, 2021
novemberborn added a commit to avajs/eslint-plugin-ava that referenced this pull request Sep 18, 2021
@novemberborn novemberborn merged commit 69b88f9 into main Sep 18, 2021
@novemberborn novemberborn deleted the cjs-default branch September 18, 2021 14:35
novemberborn added a commit to avajs/eslint-plugin-ava that referenced this pull request Sep 18, 2021
novemberborn added a commit to avajs/eslint-plugin-ava that referenced this pull request Sep 18, 2021
novemberborn added a commit to avajs/eslint-plugin-ava that referenced this pull request Sep 18, 2021
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

Successfully merging this pull request may close these issues.

Ava test() expression is not callable / has no call signatures
1 participant