Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add missing tests for #182 #184

Merged
merged 1 commit into from Mar 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -22,9 +22,8 @@
"node": ">=6"
},
"dependencies": {
"rimraf": "^2.6.2"
"rimraf": "^2.6.3"
},
"dependencies": {},
silkentrance marked this conversation as resolved.
Show resolved Hide resolved
"devDependencies": {
"eslint": "^4.19.1",
"eslint-plugin-mocha": "^5.0.0",
Expand Down
4 changes: 4 additions & 0 deletions test/file-sync-test.js
Expand Up @@ -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 () {
Expand Down
10 changes: 10 additions & 0 deletions test/file-test.js
Expand Up @@ -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 () {
Expand Down