Skip to content

TypeError: A dynamic import callback was invoked without --experimental-vm-modules #116

@martinchrzansaxo

Description

@martinchrzansaxo

When running the new version 10.x in test running jest 30.x, I am getting this error

TypeError: A dynamic import callback was invoked without --experimental-vm-modules

It is pretty simple test:

import looksSame from 'looks-same';

describe("imageComp", ()=> {
 it('should return true for identical images', async () => {
     const path1 =  '__test_images__/original_image.png';
     const path2 =  '__test_images__/same_image.png';
     const { equal, diffImage, differentPixels } = await looksSame(path1, path2, {
        createDiffImage: true,
    });
    expect(equal).toBe(true);
}});

Any way to avoid this flag? Enabling it breaks my other tests so I would like to avoid that

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions