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:
@@ -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¶m2=abc',
|
||||
'/airbrake-backend/api/v4/random/endpoint?param1=123¶m2=abc',
|
||||
),
|
||||
).toBe('/random/endpoint?param1=123¶m2=abc&key=fakeApiKey');
|
||||
).toBe('/v4/random/endpoint?param1=123¶m2=abc&key=fakeApiKey');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user