()
| 16 | }); |
| 17 | |
| 18 | async function runTest() { |
| 19 | const { hatTokenMap } = (await getCursorlessApi()).graph!; |
| 20 | |
| 21 | await openNewEditor("Hello world testing whatever"); |
| 22 | |
| 23 | // Check that hats appear by default |
| 24 | await hatTokenMap.addDecorations(); |
| 25 | assert((await hatTokenMap.getReadableMap(false)).getEntries().length !== 0); |
| 26 | |
| 27 | // Check that hats disappear when turned off |
| 28 | await vscode.commands.executeCommand("cursorless.toggleDecorations"); |
| 29 | await hatTokenMap.addDecorations(); |
| 30 | assert((await hatTokenMap.getReadableMap(false)).getEntries().length === 0); |
| 31 | |
| 32 | // Check that hats reappear when turned back on |
| 33 | await vscode.commands.executeCommand("cursorless.toggleDecorations"); |
| 34 | await hatTokenMap.addDecorations(); |
| 35 | assert((await hatTokenMap.getReadableMap(false)).getEntries().length !== 0); |
| 36 | } |
no test coverage detected