TheBrainFamily / wait-for-expect

Wait for expectation to be true, useful for integration and end to end testing. Integral part of react-testing-library.
MIT License
293 stars 31 forks source link

Help with usage. #31

Open damontgomery opened 3 years ago

damontgomery commented 3 years ago

Should I be able to use this library in a browser?

I have a TypeScript project and am importing it like this,

import waitForExpect from 'wait-for-expect';

When I run Web Test Runner which includes Mocha / Chai, I get these notices.

 🚧 Browser logs on Chromium:
      SyntaxError: The requested module './../../../../../node_modules/wait-for-expect/lib/index.js' does not provide an export named 'default'
 🚧 Browser logs on Firefox:
      SyntaxError: import not found: default
 🚧 Browser logs on Webkit:
      SyntaxError: Importing binding name 'default' cannot be resolved by star export entries.

The TypeScript compiler doesn't complain, just the browser it seems.

Apologies if this is a simple question.