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

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

Closed
mstange opened this issue Aug 19, 2018 · 2 comments
Closed

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

mstange opened this issue Aug 19, 2018 · 2 comments
Labels
code maintenance Issues that are not user facing, but are related the technical debt with the code itself help wanted Things ready to be worked on by anyone. Issues must include instructions on how to complete the task ready Issue has defined requirements. It can be grabbed and worked on tests Anything related to tests

Comments

@mstange
Copy link
Contributor

mstange commented Aug 19, 2018

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)
@julienw julienw added code maintenance Issues that are not user facing, but are related the technical debt with the code itself help wanted Things ready to be worked on by anyone. Issues must include instructions on how to complete the task good first issue Good issue for new contributors, the issue must have clear instructions on how to complete the work tests Anything related to tests ready Issue has defined requirements. It can be grabbed and worked on labels Aug 21, 2018
julienw added a commit to julienw/perf.html that referenced this issue Aug 21, 2018
@mstange mstange removed the good first issue Good issue for new contributors, the issue must have clear instructions on how to complete the work label Aug 22, 2018
@mstange
Copy link
Contributor Author

mstange commented Oct 1, 2018

#1203 has taken care of this.

@mstange mstange closed this as completed Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code maintenance Issues that are not user facing, but are related the technical debt with the code itself help wanted Things ready to be worked on by anyone. Issues must include instructions on how to complete the task ready Issue has defined requirements. It can be grabbed and worked on tests Anything related to tests
Projects
None yet
Development

No branches or pull requests

2 participants