From ccc98cac9f9653865526d6b9242dadf6e9d0953d Mon Sep 17 00:00:00 2001 From: Carsten Klein Date: Sat, 12 Jan 2019 17:45:35 +0100 Subject: [PATCH] chore: remove duplicate dependencies section from package.json chore: update rimraf to latest version --- package.json | 3 +-- test/file-sync-test.js | 4 ++++ test/file-test.js | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fd60e8c..eb6556f 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,8 @@ "node": ">=6" }, "dependencies": { - "rimraf": "^2.6.2" + "rimraf": "^2.6.3" }, - "dependencies": {}, "devDependencies": { "eslint": "^4.19.1", "eslint-plugin-mocha": "^5.0.0", diff --git a/test/file-sync-test.js b/test/file-sync-test.js index 52689c5..2c063ed 100644 --- a/test/file-sync-test.js +++ b/test/file-sync-test.js @@ -44,6 +44,10 @@ describe('tmp', function () { }); describe('when running issue specific inband tests', function () { + it('on issue #182: should not replace empty postfix with ".tmp"', function () { + const tmpobj = tmp.fileSync({ postfix: '' }); + assert.ok(!tmpobj.name.endsWith('.tmp')); + }); }); describe('when running standard outband tests', function () { diff --git a/test/file-test.js b/test/file-test.js index 3660a22..494696b 100644 --- a/test/file-test.js +++ b/test/file-test.js @@ -54,6 +54,16 @@ describe('tmp', function () { }); describe('when running issue specific inband tests', function () { + it('on issue #182: should not replace empty postfix with ".tmp"', function (done) { + tmp.file({ postfix: '' }, function (err, path) { + try { + assert.ok(!path.endsWith('.tmp')); + } catch (err) { + return done(err); + } + done(); + }); + }); }); describe('when running standard outband tests', function () {