Updated to stryker v4

This commit is contained in:
Alejandro Celaya
2020-11-13 23:06:03 +01:00
parent 5c80e853c6
commit 0671fa6567
10 changed files with 378 additions and 178 deletions

View File

@@ -35,7 +35,7 @@ describe('ShlinkApiClient', () => {
it('returns create short URL', async () => {
const { createShortUrl } = createApiClient({ data: shortUrl });
const result = await createShortUrl({});
const result = await createShortUrl({ longUrl: '' });
expect(result).toEqual(shortUrl);
});
@@ -45,10 +45,11 @@ describe('ShlinkApiClient', () => {
const { createShortUrl } = new ShlinkApiClient(axiosSpy, '', '');
await createShortUrl(
{ foo: 'bar', empty: undefined, anotherEmpty: null },
// @ts-expect-error
{ longUrl: 'bar', customSlug: undefined, maxVisits: null },
);
expect(axiosSpy).toHaveBeenCalledWith(expect.objectContaining({ data: { foo: 'bar' } }));
expect(axiosSpy).toHaveBeenCalledWith(expect.objectContaining({ data: { longUrl: 'bar' } }));
});
});

View File

@@ -24,7 +24,7 @@ describe('utils', () => {
});
describe('rangeOf', () => {
const func = (i) => `result_${i}`;
const func = (i: number) => `result_${i}`;
const size = 5;
it('builds a range of specified size invike provided function', () => {