           result.push file.relative
         .on 'error', (err)->done(err)
         .on 'end', ->
-          expect(result).be.deep.equal ['fixtures/folder/index.md']
+          expect(result).be.deep.equal expected
           done()

        result.push file.relative
      .on 'error', (err)->done(err)
      .on 'end', ->
        expect(result).be.deep.equal ['fixtures/folder/index.md']
        done()

    it 'should filter files async default', (done)->

      dir.load read:true, (err, result)->
        unless err
          result = result.map (file)->file.relative
          expect(result).be.deep.equal expected
        done(err)
    it 'should filter files async buffer', (done)->
      dir = Folder path.join(__dirname, 'fixtures', 'folder'), base: __dirname
      dir.load read:true, filter: filterFn, (err, result)->
        unless err
          result = result.map (file)->file.relative
          expect(result).be.deep.equal expected
        done(err)
    it 'should filter files async stream', (done)->
      dir = Folder path.join(__dirname, 'fixtures', 'folder'), base: __dirname
