UNPKG
level-filesystem
Version:
latest (1.2.0)
1.2.0
1.1.0
1.0.2
1.0.1
1.0.0
0.0.4
0.0.3
0.0.2
0.0.1
0.0.0
Full implementation of the fs module on top of leveldb
github.com/mafintosh/level-filesystem
level-filesystem
/
test
/
close.js
16 lines
(14 loc)
•
286 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var test =
require
(
'./helpers/test'
); test(
'close'
,
function
(fs, t)
{ fs.
open
(
'/test'
,
'w'
,
function
(err, fd)
{ t.ok(!err); fs.
close
(fd,
function
(err)
{ t.ok(!err); fs.fsync(fd,
function
(err)
{ t.ok(err); t.same(err.code,
'EBADF'
); t.
end
(); }) }); }); });