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

Error setting expect options #1318

Open
lararojasmr opened this issue Oct 2, 2023 · 2 comments
Open

Error setting expect options #1318

lararojasmr opened this issue Oct 2, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@lararojasmr
Copy link

When I try to follow the documentation with the latest release, I'm getting this error:

TS2306: File node_modules/expect-webdriverio/types/jest-global.d.ts is not a module.

The code is:

import {setOptions} from 'expect-webdriverio';

export default class Assert extends Localized {
  private static readonly DEFAULT_ASSERT_OPTIONS = {
    wait: 15000,
    interval: 500,
    message: 'Assertion Error.',
  };

  constructor() {
    super();
  }

  public static async setAssertOptions(options: ExpectWebdriverIO.DefaultOptions): Promise<void> {
    //const expectWdio = await require();
    setOptions(merger(Assert.DEFAULT_ASSERT_OPTIONS, options));
  }

  public static async setDefaultAssertOptions(): Promise<void> {
    const expectWdio = await import('expect-webdriverio');
    expectWdio.setOptions(Assert.DEFAULT_ASSERT_OPTIONS);
  }
}

Trying to do a dynamic import i get the same.

@lararojasmr
Copy link
Author

@christian-bromann ☝🏼 it's happening after release 4 days ago!

@christian-bromann
Copy link
Member

Thanks for reporting!

We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers!

@christian-bromann christian-bromann added the help wanted Extra attention is needed label Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants