aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tmp/test/file-test.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-16 01:59:39 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-16 02:00:31 +0100
commitbd65bb67e25a79b019d745b7262b2008ce2adb15 (patch)
tree89e1b032103a63737f1a703e6a943832ef261704 /node_modules/tmp/test/file-test.js
parentf91466595b651721690133f58ab37f977539e95b (diff)
incrementally verify denoms
The denominations are not stored in a separate object store.
Diffstat (limited to 'node_modules/tmp/test/file-test.js')
-rw-r--r--node_modules/tmp/test/file-test.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/node_modules/tmp/test/file-test.js b/node_modules/tmp/test/file-test.js
index d9605b38a..b710859c0 100644
--- a/node_modules/tmp/test/file-test.js
+++ b/node_modules/tmp/test/file-test.js
@@ -79,6 +79,20 @@ vows.describe('File creation').addBatch({
'should have the provided postfix': Test.testPostfix('-postfix')
},
+ 'when using name': {
+ topic: function () {
+ tmp.file({ name: 'using-name.tmp' }, this.callback);
+ },
+
+ 'should not return with an error': assert.isNull,
+ 'should return with a name': Test.assertName,
+ 'should have the provided name': Test.testName(path.join(tmp.tmpdir, 'using-name.tmp')),
+ 'should be a file': function (err, name) {
+ _testFile(0100600, true);
+ fs.unlinkSync(name);
+ }
+ },
+
'when using multiple options': {
topic: function () {
tmp.file({ prefix: 'foo', postfix: 'bar', mode: 0640 }, this.callback);
@@ -132,7 +146,7 @@ vows.describe('File creation').addBatch({
'should not return with an error': assert.isNull,
'should return with a name': Test.assertName,
'should not exist': function (err, name) {
- assert.ok(!existsSync(name), "File should be removed");
+ assert.ok(!existsSync(name), 'File should be removed');
}
},
@@ -157,7 +171,7 @@ vows.describe('File creation').addBatch({
'should not return with an error': assert.isNull,
'should return with a name': Test.assertName,
'should not exist': function (err, name) {
- assert.ok(!existsSync(name), "File should be removed");
+ assert.ok(!existsSync(name), 'File should be removed');
}
},
@@ -170,7 +184,7 @@ vows.describe('File creation').addBatch({
'should return with a name': Test.assertName,
'removeCallback should remove file': function (_err, name, _fd, removeCallback) {
removeCallback();
- assert.ok(!existsSync(name), "File should be removed");
+ assert.ok(!existsSync(name), 'File should be removed');
}
}