@ticketmaster/allure-mock
Advanced tools
Comparing version 3.1.4 to 3.1.5
@@ -466,2 +466,16 @@ import { Response, createServer } from 'miragejs'; | ||
const testErrorMock = (server) => { | ||
server.get(`/api/v1/httpError/:code`, (schema, request) => { | ||
const { code } = request.params; | ||
return new Response(+code, { | ||
"x-login-page": IDENTITY_LOGIN_URL, | ||
}, { | ||
error: +code === 401 | ||
? "Token invalid" | ||
: "you are not authorized to see this content", | ||
}); | ||
}); | ||
return server; | ||
}; | ||
const DEFAULT_MOCK_MIDDLEWARES = [ | ||
@@ -471,2 +485,3 @@ configurationMock, | ||
applicationsMock, | ||
testErrorMock, | ||
]; | ||
@@ -473,0 +488,0 @@ |
@@ -472,2 +472,16 @@ 'use strict'; | ||
const testErrorMock = (server) => { | ||
server.get(`/api/v1/httpError/:code`, (schema, request) => { | ||
const { code } = request.params; | ||
return new miragejs.Response(+code, { | ||
"x-login-page": IDENTITY_LOGIN_URL, | ||
}, { | ||
error: +code === 401 | ||
? "Token invalid" | ||
: "you are not authorized to see this content", | ||
}); | ||
}); | ||
return server; | ||
}; | ||
const DEFAULT_MOCK_MIDDLEWARES = [ | ||
@@ -477,2 +491,3 @@ configurationMock, | ||
applicationsMock, | ||
testErrorMock, | ||
]; | ||
@@ -479,0 +494,0 @@ |
{ | ||
"name": "@ticketmaster/allure-mock", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"author": "Ticketmaster (https://www.ticketmaster.com/)", | ||
@@ -17,3 +17,3 @@ "contributors": [ | ||
"devDependencies": { | ||
"@ticketmaster/allure-command": "^3.1.4" | ||
"@ticketmaster/allure-command": "^3.1.5" | ||
}, | ||
@@ -20,0 +20,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50616
21
1150