-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:pushkin-consortium/pushkin
- Loading branch information
Showing
5 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,3 +139,6 @@ acs-**/*.bib | |
|
||
### Sublime | ||
**/*.sublime* | ||
|
||
# vscode | ||
.vscode/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. _testing: | ||
|
||
Testing Pushkin with Jest | ||
###################### | ||
|
||
`Jest <https://jestjs.io/en/>`_ is a JavaScript library for creating, running, and structuring tests. | ||
|
||
Install Jest using ``npm``: | ||
|
||
.. code-block:: bash | ||
$ npm install --save-dev jest | ||
To use Babel, install required dependencies via ``npm``: | ||
|
||
.. code-block:: bash | ||
$ npm install --save-dev babel-jest @babel/core @babel/preset-env | ||
Configure Babel to target your current version of Node by creating a ``babel.config.js`` file in the root of your project: | ||
|
||
.. code-block:: javascript | ||
// babel.config.js | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current', | ||
}, | ||
}, | ||
], | ||
], | ||
}; | ||
The ideal configuration for Babel will depend on your project. See `Babel's docs <https://babeljs.io/docs/en/>`_ for more details. | ||
|
||
To learn more about testing, go to `Jest official documentation <https://jestjs.io/docs/en/getting-started>`_. |