I try to do this:
it('should throw an error', async ()=> {
expect.assertions(1);
try {
await processor({}, MODULE_CONFIG)
}
catch (e) {
expect(e).toBe("[TypeError: Cannot read properties of undefined (reading 'match')]")
}
});
but it gives me this error:
I tried toMatch
like in the docs, but it also give an error (one that seems even worse)
I tried using rejects.tobe
instead, but i get the same error: