Shmew / Fable.Jester

Fable bindings for jest and friends for delightful Fable testing.
https://shmew.github.io/Fable.Jester/
MIT License
34 stars 4 forks source link

Running in Fable 3 project. #10

Open babysnakes opened 2 years ago

babysnakes commented 2 years ago

Description

I'm not sure whether it's a bug (in the sense that this library does not run on Fable 3) or outdated documentation (or just my misunderstanding 🙂 ) but the documentation for running tests refer to fable-splitter. Isn't it for Fable 2? Can I replace it with dotnet fable?

Thanks.

babysnakes commented 2 years ago

Doing some (very) basic tests it seems that I can replace fable-splitter ... with dotnet fable. If this is known, I can create a PR for replacing it in the docs.

Thanks.

babysnakes commented 2 years ago

Ok, update, this does not work when trying to import a module. It fails with an error: SyntaxError: Cannot use import statement outside a module. Maybe I need to pass it via babel or something but this is over my head as I'm not a front-end developer 🙁.

babysnakes commented 2 years ago

Just in case someone newbie as me is having the same issue - I solved it with creating a babel.config.js file:

module.exports = {presets: ['@babel/preset-env']}