Added /v4 to tests to better explain what it's trying to do

Signed-off-by: Karan Shah <karan.shah@simplybusiness.co.uk>
This commit is contained in:
Karan Shah
2022-02-04 14:29:16 +00:00
parent d5470ec47f
commit 761b6ead75
@@ -67,8 +67,8 @@ describe('createRouter', () => {
path: string,
) => string;
expect(pathRewrite('/airbrake-backend/api/random/endpoint')).toBe(
'/random/endpoint?key=fakeApiKey',
expect(pathRewrite('/airbrake-backend/api/v4/random/endpoint')).toBe(
'/v4/random/endpoint?key=fakeApiKey',
);
});
@@ -83,9 +83,9 @@ describe('createRouter', () => {
expect(
pathRewrite(
'/airbrake-backend/api/random/endpoint?param1=123&param2=abc',
'/airbrake-backend/api/v4/random/endpoint?param1=123&param2=abc',
),
).toBe('/random/endpoint?param1=123&param2=abc&key=fakeApiKey');
).toBe('/v4/random/endpoint?param1=123&param2=abc&key=fakeApiKey');
});
});
});