refactor sonarqube findings
This commit is contained in:
@@ -725,7 +725,7 @@ test('256-bit creator identity survives reload, route deletion and requires expl
|
||||
|
||||
test('creator identity never falls back to insecure randomness or replaces corrupt stored identity', async () => {
|
||||
const { api, localStorage } = await loadLocalRoutes({ crypto: {} });
|
||||
assert.throws(() => api.creatorId(), /Gerätekennung/);
|
||||
assert.throws(() => api.creatorId(), error => error.name === 'TypeError' && /Gerätekennung/.test(error.message));
|
||||
localStorage.setItem('wegwichtel.creator-id.v1', 'broken');
|
||||
assert.throws(() => api.creatorId(), /Gerätekennung/);
|
||||
assert.equal(localStorage.getItem('wegwichtel.creator-id.v1'), 'broken');
|
||||
|
||||
Reference in New Issue
Block a user