Slight modifications to make jest easier to use from JS