Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I get the following error when I run a test that uses the store with jest:
SyntaxError: Unexpected token export
I tried to add transformIgnorePatterns like:
But it did not help.
Thanks for the project. I looked into this and it's due to how Jest handles ES2015 modules (or rather doesn't handle them) from what I can tell. Observable Store compiles using ES2015 for the module setting since it's designed for apps using ES2015 modules. However, Jest has some challenges with that from what I've seen in the various repository issues. Here's a specific post related to ts-jest:
It implies that the
I tried compiling Observable Store using
It's not something I'm going to have time to look into right away since this isn't technically an Observable Store problem and more of a problem with how Jest handles ES2015 modules. If I end up changing the module setting and releasing a new version with that I'll let you know.