Pushkin
Search…
Testing Pushkin with Jest
The content on this page may be out of date - stay tuned for edits!
Jest is a JavaScript library for creating, running, and structuring tests.
Install Jest using yarn:
1
$ yarn add --dev jest
Copied!
To use Babel, install required dependencies via yarn:
1
$ yarn add --dev babel-jest @babel/core @babel/preset-env
Copied!
Configure Babel to target your current version of Node by creating a babel.config.js file in the root of your project:
1
// babel.config.js
2
module.exports = {
3
presets: [
4
[
5
'@babel/preset-env',
6
{
7
targets: {
8
node: 'current',
9
},
10
},
11
],
12
],
13
};
Copied!
The ideal configuration for Babel will depend on your project. See Babel’s docs for more details.
To learn more about testing, go to Jest official documentation.
Last modified 1yr ago
Copy link