summaryrefslogtreecommitdiff
path: root/date-fns/src/compareDesc/benchmark.js
blob: c67d4bc720f322da9b3723140d253a789b357e34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// @flow
/* eslint-env mocha */
/* global suite, benchmark */

import compareDesc from '.'

suite('compareDesc', function () {
  benchmark('date-fns', function () {
    return compareDesc(this.dateA, this.dateB)
  })
}, {
  setup: function () {
    this.dateA = new Date()
    this.dateB = new Date(this.dateA.getTime() + 604800000)
  }
})