Skip to content

Commit 055f91f

Browse files
committed
remved temp-fs package
1 parent 440aa80 commit 055f91f

File tree

3 files changed

+8
-57
lines changed

3 files changed

+8
-57
lines changed

package-lock.json

Lines changed: 1 addition & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"https-proxy-agent": "^5.0.1",
2222
"is-running": "^2.1.0",
2323
"ps-tree": "=1.2.0",
24-
"temp-fs": "^0.9.9",
2524
"agent-base": "^6.0.2"
2625
},
2726
"devDependencies": {

test/local.js

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ var expect = require('expect.js'),
33
mocks = require('mocks'),
44
path = require('path'),
55
fs = require('fs'),
6+
os = require('os'),
67
rimraf = require('rimraf'),
78
Proxy = require('proxy'),
8-
tempfs = require('temp-fs'),
99
browserstack = require('../index'),
1010
LocalBinary = require('../lib/LocalBinary');
1111

@@ -270,7 +270,7 @@ describe('Start sync', () => {
270270

271271
describe('LocalBinary', function () {
272272
describe('Retries', function() {
273-
var unlinkTmp,
273+
var tempDir,
274274
defaultBinaryPath,
275275
validBinaryPath,
276276
sandBox;
@@ -282,18 +282,11 @@ describe('LocalBinary', function () {
282282
// removeIfInvalid();
283283
(new LocalBinary()).binaryPath({}, 'abc', 9, function(binaryPath) {
284284
defaultBinaryPath = binaryPath;
285-
tempfs.mkdir({
286-
recursive: true
287-
}, function(err, dir) {
285+
tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'browserstack-test-'));
286+
validBinaryPath = path.join(tempDir, path.basename(binaryPath));
287+
fs.rename(defaultBinaryPath, validBinaryPath, function(err) {
288288
if(err) { throw err; }
289-
290-
validBinaryPath = path.join(dir.path, path.basename(binaryPath));
291-
fs.rename(defaultBinaryPath, validBinaryPath, function(err) {
292-
if(err) { throw err; }
293-
294-
unlinkTmp = dir.unlink;
295-
done();
296-
});
289+
done();
297290
});
298291
});
299292
});
@@ -347,7 +340,7 @@ describe('LocalBinary', function () {
347340
fs.rename(validBinaryPath, defaultBinaryPath, function(err) {
348341
if(err) { throw err; }
349342

350-
unlinkTmp(done);
343+
rimraf(tempDir, done);
351344
});
352345
});
353346
});

0 commit comments

Comments
 (0)