     describe 'fs.readFileSync', ->
       it 'reads a normal file', ->
         file1 = path.join fixtures, 'asar', 'a.asar', 'file1'
-        assert.equal fs.readFileSync(file1).toString(), 'file1\n'
+        assert.equal fs.readFileSync(file1).toString().trim(), 'file1'
         file2 = path.join fixtures, 'asar', 'a.asar', 'file2'
-        assert.equal fs.readFileSync(file2).toString(), 'file2\n'
+        assert.equal fs.readFileSync(file2).toString().trim(), 'file2'
         file3 = path.join fixtures, 'asar', 'a.asar', 'file3'
-        assert.equal fs.readFileSync(file3).toString(), 'file3\n'
+        assert.equal fs.readFileSync(file3).toString().trim(), 'file3'
 
       it 'reads from a empty file', ->
         file = path.join fixtures, 'asar', 'empty.asar', 'file1'

          fd = fs.openSync p, 'r'
          buffer = new Buffer(6)
          fs.readSync fd, buffer, 0, 6, 0
          assert.equal String(buffer), 'file1\n'
          fs.closeSync fd

      it 'throws ENOENT error when can not find file', ->

    it 'can request a file in package', (done) ->
      p = path.resolve fixtures, 'asar', 'a.asar', 'file1'
      $.get "file://#{p}", (data) ->
        assert.equal data.trim(), 'file1'
        done()

    it 'can request a file in package with unpacked files', (done) ->
      p = path.resolve fixtures, 'asar', 'unpack.asar', 'a.txt'
      $.get "file://#{p}", (data) ->
        assert.equal data.trim(), 'a'
        done()

    it 'can request a linked file in package', (done) ->
      p = path.resolve fixtures, 'asar', 'a.asar', 'link2', 'link1'
      $.get "file://#{p}", (data) ->
        assert.equal data.trim(), 'file1'
        done()

    it 'can request a file in filesystem', (done) ->
      p = path.resolve fixtures, 'asar', 'file'
      $.get "file://#{p}", (data) ->
        assert.equal data.trim(), 'file'
        done()

    it 'gets 404 when file is not found', (done) ->
