Pushkin
  • Welcome!
  • Getting Started
    • Installing Pushkin and dependencies
      • macOS
      • Windows 10
        • Windows Subsystem for Linux
        • AWS EC2 Instance
      • Ubuntu Linux
    • Quickstart
      • Quickstart: Example Outputs
    • Deploying to AWS
      • Install required software.
      • Configure the AWS and ECS CLIs.
      • Register a domain.
      • Set up DockerHub.
      • Initialize AWS Deploy.
    • Tutorial: Simple Experiment
  • FAQ
    • FAQ
  • Advanced
    • Pushkin CLI
    • Using Experiment Templates
      • Lexical decision template
      • Grammaticality judgment template
      • Self-paced reading template
    • Experiment Component Structure
      • Experiment Config.yaml Files
      • Experiment Web Page Component
      • Worker Component, Migration, and Seed
    • Modifying Site Template
      • React Bootstrap
      • Header and Footer
      • Home Page
      • Findings Page
      • About Page
      • Feedback Page
    • Troubleshooting Pushkin
    • Pushkin Client
    • pushkin-api
      • API Controller Builder
      • Core API
    • Users & Authentication
    • Deployment
      • Deleting AWS
  • Developers
    • Developing with Pushkin
    • Getting Started on Development
    • Overview of Technologies
    • Testing Pushkin with Jest
    • Working with Templates
Powered by GitBook
On this page

Was this helpful?

  1. Developers

Testing Pushkin with Jest

PreviousOverview of TechnologiesNextWorking with Templates

Last updated 1 year ago

Was this helpful?

The content on this page may be out of date - stay tuned for edits!

is a JavaScript library for creating, running, and structuring tests.

Install Jest using yarn:

 yarn add --dev jest

To use Babel, install required dependencies via yarn:

 yarn add --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:

// babel.config.js
 module.exports = {
     presets: [
         [
             '@babel/preset-env',
             {
                 targets: {
                     node: 'current',
                 },
             },
         ],
     ],
 };

The ideal configuration for Babel will depend on your project. See for more details.

To learn more about testing, go to .

Jest
Babel’s docs
Jest official documentation