asciidoctor/asciidoctor.js

Cannot read property 'Opal' of undefined

Laffini opened this issue · 3 comments

I'm currently working on a feature that uses asciidoctor.js, I've created some tests using jest and it was all working fine until the main branch of the project moved from using .babelrc to babel.config.js, once I rebased the tests fail with the error 'Cannot read property 'Opal' of undefined', if I convert the file back to .babelrc the failure goes away. The failure only occurs in jest tests, the feature works fine when the the react app is run. The contents of the .babelrc and babel.config.js are identical.

Any ideas?

Hello @Laffini

Could you please provide a reproducible test case? You should ask usage questions in the community chat at https://asciidoctor.zulipchat.com, maybe someone had a similar issue and will be able to help you.

Unfortunately I wasn't able to find anyone who had experienced this issue before. This project was at work and unfortunately due to time constraints I wasn't able to setup a new project reproducing this issue. Decided to create a jest mock of the module and move forward.

For reference, could you please share your babel.config.js and the command you are running?