1
0
mirror of https://github.com/fuse-friends/fuse-native synced 2024-10-27 18:34:01 +00:00
fuse-friends_fuse-native/test/misc.js
2019-08-02 00:19:40 +02:00

44 lines
984 B
JavaScript

var mnt = require('./fixtures/mnt')
var fuse = require('../')
var tape = require('tape')
tape('mount', function (t) {
fuse.mount(mnt, { force: true }, function (err) {
t.error(err, 'no error')
t.ok(true, 'works')
fuse.unmount(mnt, function () {
t.end()
})
})
})
tape('mount + unmount + mount', function (t) {
fuse.mount(mnt, { force: true }, function (err) {
t.error(err, 'no error')
t.ok(true, 'works')
fuse.unmount(mnt, function () {
fuse.mount(mnt, { force: true }, function (err) {
t.error(err, 'no error')
t.ok(true, 'works')
fuse.unmount(mnt, function () {
t.end()
})
})
})
})
})
tape('mnt point must exist', function (t) {
fuse.mount(mnt + '.does-not-exist', {}, function (err) {
t.ok(err, 'had error')
t.end()
})
})
tape('mnt point must be directory', function (t) {
fuse.mount(__filename, {}, function (err) {
t.ok(err, 'had error')
t.end()
})
})