Files
atom/spec/stdlib/fs-spec.coffee
Nathan Sobo 07b40cdbeb RootView opens a project for the directory of the url passed to initialize.
Rename fixtures/file-finder-dir to fixtures/dir, because it's not really file-finder specific.
2012-01-03 16:01:46 -07:00

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()