Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('displays Auto Detect as the selected grammar', async () => {
editor.setGrammar(atom.grammars.nullGrammar);
atom.commands.dispatch(editor.getElement(), 'grammar-selector:show');
await SelectListView.getScheduler().getNextUpdatePromise();
const grammarView = atom.workspace.getModalPanels()[0].getItem().element;
expect(grammarView.querySelector('li.active').textContent).toBe(
'Auto Detect'
);
}));