No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Mocking openURL in Jest unit tests?

    Help
    jest mock openurl unit test
    1
    1
    173
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      ChrisO last edited by

      Hoping someone else may have found a solution for this. I’m writing unit tests for our PWA at the moment. We have a number of functions that call openURL. I just want to create a mock for openURL to check that it has been called correctly. So far every solution I’ve tried has broken the unit test and generated a “TypeError: Cannot read property 'electron” of undefined" error.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post