From ea1726a661b77088ce59a8d89fd086b66b1a1836 Mon Sep 17 00:00:00 2001 From: Andrew Osheroff Date: Wed, 7 Aug 2019 12:55:41 +0200 Subject: [PATCH] added double mount test --- test/misc.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/misc.js b/test/misc.js index f7fda39..1aec5b6 100644 --- a/test/misc.js +++ b/test/misc.js @@ -33,6 +33,21 @@ tape('mount + unmount + mount', function (t) { }) }) +tape('mount + unmount + mount with same instance fails', function (t) { + const fuse = new Fuse(mnt, {}, { force: true, debug: false }) + + fuse.mount(function (err) { + t.error(err, 'no error') + t.ok(true, 'works') + fuse.unmount(function () { + fuse.mount(function (err) { + t.ok(err, 'had error') + t.end() + }) + }) + }) +}) + tape('mnt point must exist', function (t) { const fuse = new Fuse('.does-not-exist', {}, { debug: false }) fuse.mount(function (err) {