Skip to content

Date.parse() not supported #9

@dustinsgoodman

Description

@dustinsgoodman

I have some production code that does Date.parse explicitly. When I was running my test suite using timemachine, I received the following error:

Failure/Error: TypeError: undefined is not a constructor (evaluating 'Date.parse(currentDateTime)') in http://127.0.0.1:50456/assets/services/social_hub/social_blast_validator.js?body=1?body=1 (line 244)

I propose just adding an additional method to your mock object that is the original parse function.

Note: A workaround for me was to convert my Date.parse() commands to new Date() commands.

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