Skip to content

Instantly share code, notes, and snippets.

@gdborton
Created May 19, 2017 20:41
Show Gist options
  • Save gdborton/757dd51aaeafd17fb00894aa7bd9dcce to your computer and use it in GitHub Desktop.
Save gdborton/757dd51aaeafd17fb00894aa7bd9dcce 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