mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-20 22:27:24 -04:00
Fix tests
This commit is contained in:
@@ -136,7 +136,7 @@ async function _findRecentForRequest(
|
||||
environmentId: string | null,
|
||||
limit: number,
|
||||
): Promise<Array<Response>> {
|
||||
const query = {
|
||||
const query: Object = {
|
||||
parentId: requestId,
|
||||
};
|
||||
|
||||
@@ -170,7 +170,7 @@ export async function create(patch: Object = {}, maxResponses: number = 20) {
|
||||
patch.requestVersionId = requestVersion ? requestVersion._id : null;
|
||||
|
||||
// Filter responses by environment if setting is enabled
|
||||
const query = { parentId };
|
||||
const query: Object = { parentId };
|
||||
if (
|
||||
(await models.settings.getOrCreate()).filterResponsesByEnv &&
|
||||
patch.hasOwnProperty('environmentId')
|
||||
|
||||
@@ -104,7 +104,7 @@ describe('authorization_code', () => {
|
||||
error: null,
|
||||
error_uri: null,
|
||||
error_description: null,
|
||||
xResponseId: 'res_dd2ccc1a2745477a881a9e8ef9d42403',
|
||||
xResponseId: expect.stringMatching(/^res_/),
|
||||
});
|
||||
});
|
||||
|
||||
@@ -191,7 +191,7 @@ describe('authorization_code', () => {
|
||||
error: null,
|
||||
error_uri: null,
|
||||
error_description: null,
|
||||
xResponseId: 'res_e3e96e5fdd6842298b66dee1f0940f3d',
|
||||
xResponseId: expect.stringMatching(/^res_/),
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('client_credentials', () => {
|
||||
error: null,
|
||||
error_uri: null,
|
||||
error_description: null,
|
||||
xResponseId: 'res_dd2ccc1a2745477a881a9e8ef9d42403',
|
||||
xResponseId: expect.stringMatching(/^res_/),
|
||||
});
|
||||
});
|
||||
|
||||
@@ -173,7 +173,7 @@ describe('client_credentials', () => {
|
||||
error: null,
|
||||
error_uri: null,
|
||||
error_description: null,
|
||||
xResponseId: 'res_e3e96e5fdd6842298b66dee1f0940f3d',
|
||||
xResponseId: expect.stringMatching(/^res_/),
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -95,7 +95,7 @@ describe('password', () => {
|
||||
error: null,
|
||||
error_uri: null,
|
||||
error_description: null,
|
||||
xResponseId: 'res_dd2ccc1a2745477a881a9e8ef9d42403',
|
||||
xResponseId: expect.stringMatching(/^res_/),
|
||||
});
|
||||
});
|
||||
|
||||
@@ -176,7 +176,7 @@ describe('password', () => {
|
||||
error: null,
|
||||
error_uri: null,
|
||||
error_description: null,
|
||||
xResponseId: 'res_e3e96e5fdd6842298b66dee1f0940f3d',
|
||||
xResponseId: expect.stringMatching(/^res_/),
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user