mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-29 12:55:21 +01:00
27 lines
427 B
TypeScript
27 lines
427 B
TypeScript
|
// Add chrome storage api
|
||
|
const get = jest.fn();
|
||
|
const set = jest.fn();
|
||
|
const has = jest.fn();
|
||
|
const remove = jest.fn();
|
||
|
const QUOTA_BYTES = 10;
|
||
|
const getBytesInUse = jest.fn();
|
||
|
const clear = jest.fn();
|
||
|
global.chrome = {
|
||
|
storage: {
|
||
|
local: {
|
||
|
set,
|
||
|
get,
|
||
|
remove,
|
||
|
QUOTA_BYTES,
|
||
|
getBytesInUse,
|
||
|
clear,
|
||
|
},
|
||
|
session: {
|
||
|
set,
|
||
|
get,
|
||
|
has,
|
||
|
remove,
|
||
|
},
|
||
|
},
|
||
|
} as any;
|