mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
check that we only fetch legacy once, ever
This commit is contained in:
parent
a3691fa112
commit
8e21d2e5cc
1 changed files with 10 additions and 0 deletions
|
@ -181,6 +181,16 @@ describe('getGuildData', () => {
|
|||
const storedGuildData = await config.kv.guildData.get('123');
|
||||
expect(storedGuildData).toMatchObject(expectedGuildData);
|
||||
});
|
||||
|
||||
it('fails an import and prevents re-fetch', async () => {
|
||||
const [config] = configContext();
|
||||
|
||||
mockFetchLegacyServer.mockReturnValue(null);
|
||||
|
||||
await getGuildData(config, '123');
|
||||
await getGuildData(config, '123');
|
||||
expect(mockFetchLegacyServer).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue