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

44 lines
984 B
JavaScript
Raw Normal View History

2015-03-22 11:57:52 +00:00
var mnt = require('./fixtures/mnt')
var fuse = require('../')
var tape = require('tape')
tape('mount', function (t) {
2019-07-16 11:46:43 +00:00
fuse.mount(mnt, { force: true }, function (err) {
2015-03-22 11:57:52 +00:00
t.error(err, 'no error')
t.ok(true, 'works')
fuse.unmount(mnt, function () {
t.end()
})
})
})
tape('mount + unmount + mount', function (t) {
2019-07-16 11:46:43 +00:00
fuse.mount(mnt, { force: true }, function (err) {
2015-03-22 11:57:52 +00:00
t.error(err, 'no error')
t.ok(true, 'works')
fuse.unmount(mnt, function () {
2019-07-16 11:46:43 +00:00
fuse.mount(mnt, { force: true }, function (err) {
2015-03-22 11:57:52 +00:00
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()
})
})