Skip to content

Instantly share code, notes, and snippets.

@kaddopur
Created May 15, 2020 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaddopur/bf7ecabffb9bae5e2d348d018ffc0b25 to your computer and use it in GitHub Desktop.
Save kaddopur/bf7ecabffb9bae5e2d348d018ffc0b25 to your computer and use it in GitHub Desktop.
test diff
- await CrumbService.read(mockReq, 'CrumbService', { foo: 'foo' }, {}, callback);
+ await new Promise(resolve =>
+ CrumbService.read(mockReq, 'CrumbService', { foo: 'foo' }, {}, (...args) => {
+ callback(...args);
+ resolve();
+ })
+ );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment