Version 3.18.1
Show:

Test.DateAssert Class

Module: test

The DateAssert object provides functions to test JavaScript Date objects for a variety of cases.

Item Index

Methods

Methods

datesAreEqual

(
  • expected
  • actual
  • message
)
static

Asserts that a date's month, day, and year are equal to another date's.

Parameters:

  • expected Date

    The expected date.

  • actual Date

    The actual date to test.

  • message String

    (Optional) The message to display if the assertion fails.

timesAreEqual

(
  • expected
  • actual
  • message
)
static

Asserts that a date's hour, minutes, and seconds are equal to another date's.

Parameters:

  • expected Date

    The expected date.

  • actual Date

    The actual date to test.

  • message String

    (Optional) The message to display if the assertion fails.