Skip to content

Commit

Permalink
Upgrade node-fetch, use ESM for jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darashi committed Sep 1, 2021
1 parent ffce791 commit b155efe
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 20 deletions.
9 changes: 0 additions & 9 deletions babel.config.js

This file was deleted.

5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const config = {
transform: {}
};

export default config;
100 changes: 92 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"moment": "^2.29.1",
"morgan": "^1.10.0",
"multer": "^1.4.2",
"node-fetch": "^2.6.1",
"node-fetch": "^3.0.0",
"node-sass": "^5.0.0",
"query-string": "^7.0.1",
"react": "^17.0.1",
Expand Down Expand Up @@ -57,9 +57,10 @@
"build": "webpack",
"start": "node --experimental-modules src/server.mjs",
"lint": "eslint src/**/*.mjs client/**/*.jsx",
"test": "npm run lint && jest"
"test": "npm run lint && NODE_OPTIONS=--experimental-vm-modules jest"
},
"engines": {
"node": "12.x"
}
},
"type": "module"
}
1 change: 1 addition & 0 deletions tests/smoke.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { expect, test, afterAll, afterEach, beforeAll } from "@jest/globals";
import fetch from "node-fetch";
import { spawn } from "child_process";

Expand Down

0 comments on commit b155efe

Please sign in to comment.