Skip to content

Jest Test is failing with: TypeError: _reactNativeBackgroundTimer2.default.setInterval is not a function #77

@BobAleena

Description

@BobAleena

I am getting the following error when running jest tests (the code works in general but I want the tests to work too)

TypeError: _reactNativeBackgroundTimer2.default.setInterval is not a function
My codes is as follows:

const intervalId = BackgroundTimer.setInterval(() => {
    // this will be executed every 200 ms
    // even when app is the the background
    console.log('tic');
    PushNotification.localNotification({
        title: "Daily TReminder",
        message: "this works!"
      });
  }, 14400);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions