(toolNames = MENU_TOOL_NAMES)
| 6 | const MENU_TOOL_NAMES = Object.keys(toolMap); |
| 7 | |
| 8 | function createStorageSeed(toolNames = MENU_TOOL_NAMES) { |
| 9 | const seed = { |
| 10 | 'DYNAMIC_MENU:download-crx': '0', |
| 11 | 'DYNAMIC_MENU:fehelper-setting': '0' |
| 12 | }; |
| 13 | |
| 14 | toolNames.forEach((toolName, index) => { |
| 15 | seed[`DYNAMIC_TOOL:${toolName}`] = String(index + 1); |
| 16 | seed[`DYNAMIC_MENU:${toolName}`] = '1'; |
| 17 | }); |
| 18 | |
| 19 | return seed; |
| 20 | } |
| 21 | |
| 22 | function createChromeMock(storageSeed = createStorageSeed()) { |
| 23 | const createdMenus = []; |
no outgoing calls
no test coverage detected