Skip to content

Commit

Permalink
Get TextEditorRegistry specs passing
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed Jan 7, 2024
1 parent 0cf5279 commit b16be2a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/text-editor-registry-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ const { Point, Range } = TextBuffer;
const dedent = require('dedent');
const NullGrammar = require('../src/null-grammar');

function setupLanguageMode (editor) {
let languageMode = editor.getBuffer().getLanguageMode();
languageMode.useAsyncParsing = false;
languageMode.useAsyncIndent = false;
return languageMode;
}

describe('TextEditorRegistry', function() {
let registry, editor, initialPackageActivation;

Expand Down Expand Up @@ -298,8 +305,10 @@ describe('TextEditorRegistry', function() {
await initialPackageActivation;
await atom.packages.activatePackage('language-javascript');
atom.grammars.assignLanguageMode(editor, 'source.js');
let languageMode = setupLanguageMode(editor);
atom.config.set('editor.tabType', 'auto');
await initialPackageActivation;
await languageMode.ready;

editor.setText(dedent`
{
Expand Down

0 comments on commit b16be2a

Please sign in to comment.