Skip to content

Upgrade meilisearch dependency (fix jest tests not supporting ES modules) #2699

@bradenmacdonald

Description

@bradenmacdonald

Upgrading our meilisearch client package is blocked:

This seems to be blocked on upgrading from fetch-mock-jest to @fetch-mock/jest, which in turn is blocked on ESM support in Jest.

frontend-app-authoring/node_modules/@fetch-mock/jest/dist/esm/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import { FetchMock, defaultFetchMockConfig, } from 'fetch-mock';
                                                                                      ^^^^^^

    SyntaxError: Cannot use import statement outside a module

One solution could be to replace jest with Node's built in test runner, at least for those tests.

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