pull/5/head
eliot-akira 3 years ago
parent af1d64f6c2
commit 437a841e72
  1. 1
      lib/persistence.js
  2. 4
      test_lac/loadAndCrash.test.js

@ -73,7 +73,6 @@ class Persistence {
* @param {Function} callback Optional callback, signature: err * @param {Function} callback Optional callback, signature: err
*/ */
persistCachedDatabase (callback = () => {}) { persistCachedDatabase (callback = () => {}) {
const lines = [] const lines = []
if (this.inMemoryOnly) return callback(null) if (this.inMemoryOnly) return callback(null)

@ -117,10 +117,10 @@ fs.writeFile = function (path, data, options, callback_) {
fs.createWriteStream = function (path) { fs.createWriteStream = function (path) {
let content = '' let content = ''
return { return {
write(data) { write (data) {
content += data content += data
}, },
close(callback) { close (callback) {
fs.writeFile(path, content, callback) fs.writeFile(path, content, callback)
} }
} }

Loading…
Cancel
Save