I am throwing error on creating more than one instance of my class.
I want to test this scenario and tried as:
validationFn = () => new MyClass();
expect(validationFn).toThrow('Singleton');
But I observed even if I mistype Singleton
to Sing
, this test still passes.