fix(jest): add stub for errActions to prevent unhandled promise rejections #6365 (#6495)

Co-authored-by: Theo Markovic <theodore.markovic@svenskaspel.se>
This commit is contained in:
Theo Markovic
2020-10-15 02:07:49 +02:00
committed by GitHub
parent 3905fadfbe
commit 537ad6d6bf

View File

@@ -72,6 +72,9 @@ describe("auth plugin - actions", () => {
authSelectors: {
getConfigs: () => ({})
},
errActions: {
newAuthErr: () => ({})
},
oas3Selectors: {
selectedServer: () => server,
serverEffectiveValue: () => effectiveServer || server
@@ -111,6 +114,9 @@ describe("auth plugin - actions", () => {
}
})
},
errActions: {
newAuthErr: () => ({})
},
specSelectors: {
isOAS3: () => false,
operationScheme: () => "https",
@@ -139,6 +145,9 @@ describe("auth plugin - actions", () => {
fn: {
fetch: jest.fn().mockImplementation(() => Promise.resolve())
},
errActions: {
newAuthErr: () => ({})
},
getConfigs: () => ({}),
authSelectors: {
getConfigs: () => ({
@@ -294,6 +303,9 @@ describe("auth plugin - actions", () => {
getConfigs: () => ({
persistAuthorization: true
}),
errActions: {
newAuthErr: () => ({})
},
authSelectors: {
authorized: jest.fn(() => Map(data))
}