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: use tmpDir instead of fixturesDir #2583

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions test/parallel/test-regress-GH-3739.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
'use strict';

const common = require('../common');
const assert = require('assert');
const fs = require('fs');
const path = require('path');

var dir = path.resolve(common.tmpDir);

// Make sure that the tmp directory is clean
common.refreshTmpDir();

// Make a long path.
for (var i = 0; i < 50; i++) {
dir = dir + '/1234567890';
try {
fs.mkdirSync(dir, '0777');
} catch (e) {
if (e.code !== 'EEXIST') {
throw e;
}
}
}

// Test if file exists synchronously
assert(common.fileExists(dir), 'Directory is not accessible');

// Test if file exists asynchronously
fs.access(dir, function(err) {
assert(!err, 'Directory is not accessible');
});
46 changes: 0 additions & 46 deletions test/sequential/test-regress-GH-3739.js

This file was deleted.