mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Rename fixtures/file-finder-dir to fixtures/dir, because it's not really file-finder specific.
23 lines
838 B
CoffeeScript
23 lines
838 B
CoffeeScript
fs = require 'fs'
|
|
|
|
describe "fs", ->
|
|
describe ".async", ->
|
|
describe ".list(directoryPath, recursive)", ->
|
|
directoryPath = null
|
|
beforeEach -> directoryPath = require.resolve 'fixtures/dir'
|
|
|
|
describe "when recursive is true", ->
|
|
it "returns a promise that resolves to the recursive contents of that directory", ->
|
|
waitsFor (complete) ->
|
|
fs.async.list(directoryPath, true).done (result) ->
|
|
expect(result).toEqual fs.list(directoryPath, true)
|
|
complete()
|
|
|
|
describe "when recursive is false", ->
|
|
it "returns a promise that resolves to the contents of that directory", ->
|
|
waitsFor (complete) ->
|
|
fs.async.list(directoryPath).done (result) ->
|
|
expect(result).toEqual fs.list(directoryPath)
|
|
complete()
|
|
|