Skip to content

Testing Framework - spyOn() problem on Firefox. #150

Open
@theegolf

Description

@theegolf

Hi, I've faced a problem testing the cartTest.js code with Jasmine 5.4.0 on Firefox, as it gave an error

Error: <spyOn> : Can't spy on setItem because assigning to it had no effect

At first, I thought something was wrong with my code, so I copied the code from the uploaded file and rerun the test. However, the error persisted. I searched and found that this problem occurs on some browsers, i.e. Firefox and Safari (https://jasmine.github.io/pages/faq.html#localstorage), but I didn't understand how the solution worked. Could you please help me solve this problem? Thank you

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