Call atom.create with TokenizedBuffer before testing it

This commit is contained in:
Nathan Sobo 2013-12-09 12:28:13 -08:00
parent c8253be1ae
commit 5ff47f3aa1

View File

@ -431,7 +431,7 @@ describe "TokenizedBuffer", ->
it "updates the tab length of the tokenized lines", ->
buffer = atom.project.bufferForPathSync('sample.js')
buffer.setText('\ttest')
tokenizedBuffer = new TokenizedBuffer({buffer})
tokenizedBuffer = atom.create(new TokenizedBuffer({buffer}))
fullyTokenize(tokenizedBuffer)
expect(tokenizedBuffer.tokenForPosition([0,0]).value).toBe ' '
atom.config.set('editor.tabLength', 6)