Skip to content

Macros (block and inline) don't work in the vitest/bun test environment #1741

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

Open
jsimonrichard opened this issue Dec 28, 2024 · 0 comments

Comments

@jsimonrichard
Copy link

I was trying to set up some tests for a macro extension I'm working on using bun:test but they refuse to work.

When executing in a normal environment (using bun run index.ts) the extension works as expected, but when I run my tests (with bun test), the processor acts as if the extension was never registered (even though it's included when I call registry.getInlineMacros()). I tried it with vitest as well, with the same result.

I have set up a minimal reproducible example here: https://github.com/jsimonrichard/asciidoctor.js-macro-test-issue-mre

I'm not sure if this is a bug with the test runners, my setup, or asciidoctor.js. Do you have any idea whats changing between the two environments (normal and testing)?

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

No branches or pull requests

1 participant