         scanner.on('path-found', pathHandler = createPathCollector())
         scanner.on('finished-scanning', finishedHandler = jasmine.createSpy())
 
-        runs ->
-          scanner.scan()
-
-        waitsFor ->
-          finishedHandler.callCount > 0
-
+        runs -> scanner.scan()
+        waitsFor -> finishedHandler.callCount > 0
         runs ->
           expect(paths).toContain path.join(rootPath, '.root', 'subdir', '.realhidden')
           expect(paths).toContain path.join(rootPath, '.root', 'subdir', 'file1.txt')

      scanner.on('path-found', pathHandler = createPathCollector())
      scanner.on('finished-scanning', finishedHandler = jasmine.createSpy())

      runs ->
        scanner.scan()

      waitsFor ->
        pathHandler.callCount > 0

      waitsFor ->
        finishedHandler.callCount > 0

      runs ->
        # symlink-to-file1.txt is a file on windows
        if process.platform is 'win32'

      scanner.on('path-found', pathHandler = createPathCollector())
      scanner.on('finished-scanning', finishedHandler = jasmine.createSpy())

      runs -> scanner.scan()
      waitsFor -> finishedHandler.callCount > 0
      runs ->
        expect(paths.length).toBe 1
        expect(paths).toContain path.join(rootPath, 'node_modules', 'pkg', 'sample.js')
