Skip to content


  • Arctic Code Vault Contributor


  1. Haskell 1

  2. 1
    Being able to flush promise resolution (or rejection) in tests is really, really handy, and [even essential sometimes]( [Jest has an open issue for this]( but I'm impatient.
    Setting this up in userland is possible but non-trivial - an adventure, even. I'll lay out what I had to do for any future intrepid types. I'll try to explain the reasoning for all of this and have nothing be magical.
    The over-all target is to do task scheduling entirely in userland so that the task queue can be synchronously run to exhaustion. This entails faking timers and swapping out the native promise implementation for one that'll use the faked timers. All of this will be assuming you're using Jest, but the general ideas are test library agnostic.

99 contributions in the last year

Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Mon Wed Fri

Contribution activity

October 2020

Created an issue in mathjax/MathJax-demos-node that received 2 comments

Throwing exceptions instead of rendering an error message

I'm trying to use MathJax as a server-side renderer, patterened on the 'direct' styles of tex2svg and tex2mml. The normal case is working nicely en…


Seeing something unexpected? Take a look at the GitHub profile guide.

You can’t perform that action at this time.