Skip to content

fakeAsync tick does not mock the Date object #8678

@diestrin

Description

@diestrin

Steps to reproduce and a minimal demo of the problem

  • Use fakeAsync in a test
  • Create a variable with the current Date
  • tick(2000) or any other number
  • Create another variable with the current Date

Current behavior
The 2nd date is not the one you think it is

Expected/desired behavior
The 2nd date will be 2000ms later than the first one

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: testingIssues related to Angular testing features, such as TestBed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions