Closed emilgoldsmith closed 6 years ago
Done with changes :).
I did a bit of research and really agree with this statement:
from this article.
So I did a more JS equivalent of a singleton where I never create a class as we can just create our instance directly, no need to bother with whether it gets instantiated several times as that's not allowed. The parts I didn't like before was especially the copying of the methods of an instance to the object, that was really ugly, and two things that shouldn't have been that tightly coupled, solved that now in a much nicer way I think :). Also before fatal was only returning a promise after it was initialized, now it's always async which is also a lot better
And that statement makes sense to me :)
Awesome, I'll merge it in straight away then :)
Resolves #332
Also snuck in a small change to the babel-jest
.babelrc
file as with our newest node version currently being used we don't need those transforms on tests anymore.