-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dropping support for node v6.x as it is not working correctly with the installed SIGINT handlers
- Loading branch information
1 parent
0c5bc5c
commit 88e2ee1
Showing
14 changed files
with
222 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ module.exports = { | |
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
], | ||
"no-extra-boolean-cast": 0 | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ node_js: | |
- "10" | ||
- "9" | ||
- "8" | ||
- "6" | ||
sudo: false | ||
cache: | ||
directories: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* eslint-disable no-octal */ | ||
// vim: expandtab:ts=2:sw=2 | ||
|
||
var | ||
assert = require('assert'), | ||
assertions = require('./assertions'), | ||
childProcess = require('./child-process').childProcess; | ||
|
||
describe('tmp', function () { | ||
describe('issue129: safely install sigint listeners', function () { | ||
it('when simulating sandboxed behavior', function (done) { | ||
childProcess(this, 'issue129-sigint.json', function (err, stderr, stdout) { | ||
if (err) return done(err); | ||
if (!stdout && !stderr) return done(new Error('stderr or stdout expected')); | ||
if (stderr) { | ||
try { | ||
assertions.assertDoesNotStartWith(stderr, 'EEXISTS:MULTIPLE'); | ||
assertions.assertDoesNotStartWith(stderr, 'ENOAVAIL:EXISTING'); | ||
} catch (err) { | ||
return done(err); | ||
} | ||
} | ||
if (stdout) { | ||
try { | ||
assert.equal(stdout, 'EOK', 'existing listeners should have been removed and called'); | ||
} catch (err) { | ||
return done(err); | ||
} | ||
} | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
/* eslint-disable no-octal */ | ||
// vim: expandtab:ts=2:sw=2 | ||
|
||
var | ||
fs = require('fs'), | ||
tmp = require('../../lib/tmp'), | ||
// we reuse the fixtures from issue62 here | ||
fixture = require('./issue62'); | ||
|
||
tmp.setGracefulCleanup(); | ||
const | ||
tmp = require('../../lib/tmp'); | ||
|
||
// https://github.com/raszi/node-tmp/issues/121 | ||
module.exports = function (signal) { | ||
fixture.apply(this, [tmp.dirSync({ unsafeCleanup: true }), tmp]); | ||
module.exports = function () { | ||
|
||
tmp.setGracefulCleanup(); | ||
|
||
const result = tmp.dirSync({ unsafeCleanup: true }); | ||
|
||
// make sure that the process keeps running | ||
setTimeout(function () {}, 1000000); | ||
this.out(result.name, function () { }); | ||
|
||
this.kill(signal); | ||
setTimeout(function () { | ||
throw new Error('ran into timeout'); | ||
}, 10000); | ||
}; |
Oops, something went wrong.