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

import isThisYear from '.'

suite(
  'isThisYear',
  () => {
    benchmark('date-fns', function() {
      return isThisYear(this.date)
    })
  },
  {
    setup: function() {
      this.date = new Date()
    }
  }
)