Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pushkin-consortium/pushkin
Browse files Browse the repository at this point in the history
  • Loading branch information
jkhartshorne committed Mar 26, 2020
2 parents ef6dbc2 + 51db7f7 commit 5ed35ce
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,6 @@ acs-**/*.bib

### Sublime
**/*.sublime*

# vscode
.vscode/*
9 changes: 9 additions & 0 deletions docs/source/client/pushkin_client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ Likely not wanted to be invoked directly by most users. Easiest to use if added

------------

insertMetaResponse
-------------------
**Arguments:**
- **jsPych onfinish data** : { user_id : int, ... }

**Returns:** Promise. Resolves on successful connection.

------------

endExperiment
-------------------
**Arguments:** None
Expand Down
2 changes: 1 addition & 1 deletion docs/source/development/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Understanding the Front End

5. You'll also want to understand Redux better. Redux is used to keep track of application-level state variables. For Pushkin, a primary usecase is keeping track of subject IDs. The best tutorial we've found for React-Redux is `the official one <https://redux.js.org/basics/basic-tutorial>`_. Note that it's a little out-of-date with regards to use of object spread syntax (which is now supported by Node) and with how to handle asynchronous requests: we'll be using `redux sagas <https://redux-saga.js.org/docs/introduction/>`_ for that, so read up on that as well. A good place to start on why redux sagas are worth using is `here <https://engineering.universe.com/what-is-redux-saga-c1252fc2f4d1>`_.

7. At this point, we recommend going back through the tutorial in #2 above.
6. At this point, we recommend going back through the tutorial in #2 above.

Understanding Docker
--------------------
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Welcome to Pushkin's documentation!
client/pushkin_client
api/pushkin_api
usernames/index
testing/testing


Indices and tables
Expand Down
40 changes: 40 additions & 0 deletions docs/source/testing/testing.rst
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>`_.

0 comments on commit 5ed35ce

Please sign in to comment.