         runs ->
           editor.setText("// http://github.com")
 
-          {tokens} = editor.tokenizedLineForScreenRow(0)
-          expect(tokens[1].value).toBe " http://github.com"
-          expect(tokens[1].scopes).toEqual ["source.js", "comment.line.double-slash.js"]
+          tokens = editor.tokensForScreenRow(0)
+          expect(tokens).toEqual ['source.js', 'comment.line.double-slash.js', 'punctuation.definition.comment.js']
 
         waitsForPromise ->
           atom.packages.activatePackage('language-hyperlink')
 
         runs ->
-          {tokens} = editor.tokenizedLineForScreenRow(0)
-          expect(tokens[2].value).toBe "http://github.com"
-          expect(tokens[2].scopes).toEqual ["source.js", "comment.line.double-slash.js", "markup.underline.link.http.hyperlink"]
+          tokens = editor.tokensForScreenRow(0)
+          expect(tokens).toEqual ['source.js', 'comment.line.double-slash.js', 'punctuation.definition.comment.js', 'markup.underline.link.http.hyperlink']
 
       describe "when the grammar is updated", ->
         it "retokenizes existing buffers that contain tokens that match the injection selector", ->

      expect(editor.getSelectedBufferRanges()).toEqual [[[3, 5], [3, 5]], [[9, 0], [14, 0]]]

      # folds are also duplicated
      expect(editor.tokenizedLineForScreenRow(5).fold).toBeDefined()
      expect(editor.tokenizedLineForScreenRow(7).fold).toBeDefined()
      expect(editor.tokenizedLineForScreenRow(7).text).toBe "    while(items.length > 0) {"
      expect(editor.tokenizedLineForScreenRow(8).text).toBe "    return sort(left).concat(pivot).concat(sort(right));"

    it "duplicates all folded lines for empty selections on folded lines", ->
      editor.foldBufferRow(4)


      runs ->
        expect(editor.getGrammar()).toBe atom.grammars.nullGrammar
        expect(editor.tokensForScreenRow(0).length).toBe(1)

        atom.grammars.addGrammar(jsGrammar)
        expect(editor.getGrammar()).toBe jsGrammar
        expect(editor.tokensForScreenRow(0).length).toBeGreaterThan 1

  describe "editor.autoIndent", ->
    describe "when editor.autoIndent is false (default)", ->
