hunk.code_window: |                                 |              | 2019-04-01T12:13:55.015Z | 55.                                              | 2019-04-01T12:13:55.000Z |
   | Long localized date             | P            | 1987-02-11T12:13:14.015Z | 11.02.1987                                       | 1987-02-11T00:00:00.000Z |
   |                                 |              | 1453-05-29T23:59:59.999Z | 29.05.1453                                       | 1453-05-29T00:00:00.000Z |
   |                                 | PP           | 1987-02-11T12:13:14.015Z | 11. Feb. 1987                                    | 1987-02-11T00:00:00.000Z |
   |                                 |              | 1453-05-29T23:59:59.999Z | 29. Mai. 1453                                    | 1453-05-29T00:00:00.000Z |
   |                                 | PPP          | 1987-02-11T12:13:14.015Z | 11. Februar 1987                                 | 1987-02-11T00:00:00.000Z |
   |                                 |              | 1453-05-29T23:59:59.999Z | 29. Mai 1453                                     | 1453-05-29T00:00:00.000Z |
   |                                 | PPPP         | 1987-02-11T12:13:14.015Z | Mittwoch, 11. Februar 1987                       | 1987-02-11T00:00:00.000Z |
  
hunk.labels: keep keep keep replace replace keep keep keep
hunk.after_edit: |                                 | PP           | 1987-02-11T12:13:14.015Z | 11. Feb 1987                                     | 1987-02-11T00:00:00.000Z |
   |                                 |              | 1453-05-29T23:59:59.999Z | 29. Mai 1453                                     | 1453-05-29T00:00:00.000Z |
  
hunk.file_path: src/locale/de-AT/snapshot.md
hunk.type: replace
file: // @flow
  /* eslint-env mocha */
  
  import assert from 'power-assert'
  import startOfDay from '.'
  
  describe('startOfDay', function() {
    it('returns the date with the time set to 00:00:00', function() {
      const date = new Date(2014, 8 /* Sep */, 2, 11, 55, 0)
      const result = startOfDay(date)
      assert.deepEqual(result, new Date(2014, 8 /* Sep */, 2, 0, 0, 0, 0))
    })
  
    it('accepts a timestamp', function() {
      const date = new Date(2014, 8 /* Sep */, 2, 11, 55, 0).getTime()
      const result = startOfDay(date)
      assert.deepEqual(result, new Date(2014, 8 /* Sep */, 2, 0, 0, 0, 0))
    })
  
    it('does not mutate the original date', function() {
      const date = new Date(2014, 8 /* Sep */, 2, 11, 55, 0)
      startOfDay(date)
      assert.deepEqual(date, new Date(2014, 8 /* Sep */, 2, 11, 55, 0))
    })
  
    it('returns `Invalid Date` if the given date is invalid', function() {
      const result = startOfDay(new Date(NaN))
      //@ts-expect-error
      assert(result instanceof Date && isNaN(result))
    })
  
    it('throws TypeError exception if passed less than 1 argument', function() {
      assert.throws(startOfDay.bind(null), TypeError)
    })
  })
  