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

Not working with project of type:"module" #20

Open
ted94107 opened this issue Jul 10, 2022 · 0 comments
Open

Not working with project of type:"module" #20

ted94107 opened this issue Jul 10, 2022 · 0 comments

Comments

@ted94107
Copy link

ted94107 commented Jul 10, 2022

Version: 4.1.2

Details

I have a project of type "module". Project was created using the marko-vite template. When trying to import index.marko in a browser component test, I get the error "Must use import to load ES Module: .../component.js"

My jest config has:

projects: [
        {
          displayName: "browser",
          preset: "@marko/jest/preset/browser",
          testMatch: ["**/test/**/*.browser.js"],
        },
        {
          displayName: "server",
          preset: "@marko/jest/preset/node",
          testMatch: ["**/test/**/*.server.js"],
        },
    ]

Expected Behavior

For the jest test to run.

Actual Behavior

Jest test errors with message "Must use import to load ES Module: .../component.js"

Your Environment

macOS 12.4
node 17.7.2
marko 5.19.0
marko/jest 4.1.2
marko/vite 2.2.6

@ted94107 ted94107 changed the title Not working with "module" project Not working with type:"module" project Jul 10, 2022
@ted94107 ted94107 changed the title Not working with type:"module" project Not working with project of type:"module" Jul 10, 2022
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