(viteDevServer)
| 77 | { |
| 78 | name: 'custom-shortcut-plugin', |
| 79 | configureServer(viteDevServer) { |
| 80 | const action = vi.fn() |
| 81 | |
| 82 | // Keep track of actions created by the plugin |
| 83 | // To verify if they are overwritten on server restart |
| 84 | pluginShortcutActions.push(action) |
| 85 | |
| 86 | // Bind custom shortcut from plugin |
| 87 | bindCLIShortcuts( |
| 88 | viteDevServer, |
| 89 | { |
| 90 | customShortcuts: [ |
| 91 | { |
| 92 | key: 'y', |
| 93 | description: 'plugin shortcut', |
| 94 | action, |
| 95 | }, |
| 96 | ], |
| 97 | }, |
| 98 | true, |
| 99 | ) |
| 100 | }, |
| 101 | }, |
| 102 | ], |
| 103 | }) |
nothing calls this directly
no test coverage detected