jest-date-mock 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,17 @@ concurrency:
9
9
  jobs:
10
10
  test-and-build:
11
11
  runs-on: macos-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ node-version:
16
+ - 12
17
+ - 13
18
+ - 14
19
+ - 15
20
+ - 16
21
+ - 17
22
+ - 18
12
23
  steps:
13
24
  - name: Checkout
14
25
  uses: actions/checkout@v3
@@ -16,7 +27,7 @@ jobs:
16
27
  - name: Install Node.js
17
28
  uses: actions/setup-node@v3
18
29
  with:
19
- node-version: 13
30
+ node-version: ${{ matrix.node-version }}
20
31
 
21
32
  - name: Install Dependencies
22
33
  run: npm install
package/lib/index.js CHANGED
@@ -34,14 +34,8 @@ var dateClass = (0, _mockDate.mockDateClass)(Date);
34
34
  if (global.window) {
35
35
  // dom env
36
36
  global.window.Date = dateClass;
37
- global.window.performance.now = function () {
38
- return dateClass.now();
39
- };
40
37
  } else {
41
38
  // node / native env
42
39
  global.Date = dateClass;
43
- require('perf_hooks').performance.now = function () {
44
- return dateClass.now();
45
- };
46
40
  }
47
- var version = exports.version = "1.0.9";
41
+ var version = exports.version = "1.0.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jest-date-mock",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Mock `window.Date` when run unit test cases with jest. Make tests of `Date` easier.",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -34,6 +34,9 @@
34
34
  "babel-plugin-version": "^0.2.2",
35
35
  "jest": "^24.9.0"
36
36
  },
37
+ "optionalDependencies": {
38
+ "@antv/setup": "github:antvis/G2#dc3d62a2181beb9f326952a2d212900c94f2e13d"
39
+ },
37
40
  "jest": {
38
41
  "collectCoverage": true,
39
42
  "setupFiles": [