Skip to content

Our test infrastructure can't deal with async import() #1204

@mstange

Description

@mstange

In #1203 I'm trying to add a module that uses WebAssembly. WASM modules need to be instantiated asynchronously, so Webpack requires them to be in a code-split async chunk. So you need to use the import() function to load such modules.

However, our tests don't like the import() call: they now fail with the message "Not supported":

  ● doSymbolicateProfile › doSymbolicateProfile › updates the symbolication status

    Not supported

       8 | import bisection from 'bisection';
       9 |
    > 10 | const demanglerModule = import('gecko-profiler-demangle');
      11 |
      12 | import type { RequestedLib } from '../types/actions';
      13 | import type { SymbolTableAsTuple } from './symbol-store-db';

      at Object.<anonymous> (src/profile-logic/symbol-store.js:10:25)
      at Object.<anonymous> (src/actions/receive-profile.js:11:1)
      at Object.<anonymous> (src/test/fixtures/stores.js:7:1)
      at Object.<anonymous> (src/test/store/symbolication.test.js:5:1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    code maintenanceIssues that are not user facing, but are related the technical debt with the code itselfhelp wantedThings ready to be worked on by anyone. Issues must include instructions on how to complete the taskreadyIssue has defined requirements. It can be grabbed and worked ontestsAnything related to tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions