kopia lustrzana https://gitlab.com/rysiekpl/libresilient
any-of plugin test: bugfix for environments where AggregateError exists (ref. #8)
rodzic
6bf1887e7d
commit
4730361bad
|
@ -109,7 +109,11 @@ describe("plugin: any-of", () => {
|
||||||
try {
|
try {
|
||||||
await self.LibResilientPlugins[0].fetch('https://resilient.is/test.json')
|
await self.LibResilientPlugins[0].fetch('https://resilient.is/test.json')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
expect(e[0].toString()).toMatch('Error')
|
if (e instanceof Array) {
|
||||||
|
expect(e[0].toString()).toMatch('Error')
|
||||||
|
} else {
|
||||||
|
expect(e).toBeInstanceOf(AggregateError)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
expect(fetch).toHaveBeenCalled();
|
expect(fetch).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
Ładowanie…
Reference in New Issue