Skip to content

Instantly share code, notes, and snippets.

@Shobhit1
Forked from gdborton/spec_helper_jest.js
Created July 10, 2017 13:52
Show Gist options
  • Save Shobhit1/960a97d328b9c74844d3efce39a18bdb to your computer and use it in GitHub Desktop.
Save Shobhit1/960a97d328b9c74844d3efce39a18bdb to your computer and use it in GitHub Desktop.
This bit of code essentially bridges the Mocha/Jest api so that Jest can be used in place of Mocha.
// There are other differences between Jest and Mocha,
// but these were the functions being used at Airbnb.
global.context = describe;
global.before = beforeAll;
global.after = afterEach;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment