mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Put expects in a runs block
This commit is contained in:
@@ -104,28 +104,34 @@ describe "SymbolsView", ->
|
||||
|
||||
describe "TagGenerator", ->
|
||||
it "generates tags for all JavaScript functions", ->
|
||||
tags = []
|
||||
|
||||
waitsForPromise ->
|
||||
tags = []
|
||||
path = require.resolve('fixtures/sample.js')
|
||||
callback = (tag) ->
|
||||
tags.push tag
|
||||
generator = new TagGenerator(path, callback)
|
||||
generator.generate().done ->
|
||||
expect(tags.length).toBe 2
|
||||
expect(tags[0].name).toBe "quicksort"
|
||||
expect(tags[0].position.row).toBe 0
|
||||
expect(tags[1].name).toBe "quicksort.sort"
|
||||
expect(tags[1].position.row).toBe 1
|
||||
generator.generate()
|
||||
|
||||
runs ->
|
||||
expect(tags.length).toBe 2
|
||||
expect(tags[0].name).toBe "quicksort"
|
||||
expect(tags[0].position.row).toBe 0
|
||||
expect(tags[1].name).toBe "quicksort.sort"
|
||||
expect(tags[1].position.row).toBe 1
|
||||
|
||||
it "generates no tags for text file", ->
|
||||
tags = []
|
||||
|
||||
waitsForPromise ->
|
||||
tags = []
|
||||
path = require.resolve('fixtures/sample.txt')
|
||||
callback = (tag) ->
|
||||
tags.push tag
|
||||
generator = new TagGenerator(path, callback)
|
||||
generator.generate().done ->
|
||||
expect(tags.length).toBe 0
|
||||
generator.generate()
|
||||
|
||||
runs ->
|
||||
expect(tags.length).toBe 0
|
||||
|
||||
describe "go to declaration", ->
|
||||
it "doesn't move the cursor when no declaration is found", ->
|
||||
|
||||
Reference in New Issue
Block a user