mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-05-28 16:16:24 +00:00
Removed no longer needed async/await when building api client
This commit is contained in:
@@ -51,7 +51,7 @@ describe('shortUrlMetaReducer', () => {
|
||||
|
||||
describe('editShortUrlMeta', () => {
|
||||
const updateShortUrlMeta = jest.fn().mockResolvedValue({});
|
||||
const buildShlinkApiClient = jest.fn().mockResolvedValue({ updateShortUrlMeta });
|
||||
const buildShlinkApiClient = jest.fn().mockReturnValue({ updateShortUrlMeta });
|
||||
const dispatch = jest.fn();
|
||||
|
||||
afterEach(jest.clearAllMocks);
|
||||
|
||||
@@ -51,14 +51,10 @@ describe('shortUrlTagsReducer', () => {
|
||||
|
||||
describe('editShortUrlTags', () => {
|
||||
const updateShortUrlTags = jest.fn();
|
||||
const buildShlinkApiClient = jest.fn().mockResolvedValue({ updateShortUrlTags });
|
||||
const buildShlinkApiClient = jest.fn().mockReturnValue({ updateShortUrlTags });
|
||||
const dispatch = jest.fn();
|
||||
|
||||
afterEach(() => {
|
||||
updateShortUrlTags.mockReset();
|
||||
buildShlinkApiClient.mockClear();
|
||||
dispatch.mockReset();
|
||||
});
|
||||
afterEach(jest.clearAllMocks);
|
||||
|
||||
it.each([[ undefined ], [ null ], [ 'example.com' ]])('dispatches normalized tags on success', async (domain) => {
|
||||
const normalizedTags = [ 'bar', 'foo' ];
|
||||
|
||||
Reference in New Issue
Block a user