       @fs.base.mkdir "#{tmpdir}/test/a_dir"
       @fs.base.writeFile "#{tmpdir}/test/a_dir/a_file", content: ''
       {files} = await @fs.glob "#{tmpdir}/test/**", trailing: true
-      files.should.eql [
+      files.sort().should.eql [
         "#{tmpdir}/test/"
-        "#{tmpdir}/test/a_file"
         "#{tmpdir}/test/a_dir/"
         "#{tmpdir}/test/a_dir/a_file"
+        "#{tmpdir}/test/a_file"
       ]

      @fs.base.mkdir "#{tmpdir}/test/a_dir"
      @fs.base.writeFile "#{tmpdir}/test/a_dir/a_file", content: ''
      {files} = await @fs.glob "#{tmpdir}/test/*"
      files.should.eql [
        path.normalize "#{tmpdir}/test/a_file"
        path.normalize "#{tmpdir}/test/a_dir"
      ]

  they 'should traverse a directory recursively', ({ssh}) ->

      @fs.base.mkdir "#{tmpdir}/test/a_dir"
      @fs.base.writeFile "#{tmpdir}/test/a_dir/a_file.coffee", content: ''
      {files} = await @fs.glob "#{tmpdir}/test/*.coffee"
      files.sort().should.eql [
        path.normalize "#{tmpdir}/test/a_file.coffee"
      ]

