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

Dependency updates #362

Merged
merged 2 commits into from
Aug 2, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions benchmarks/read-integration-mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ const mock = require('..');
* test time.
* @param {function(Error)} done Callback.
*/
exports.test = function(done) {
exports.test = function (done) {
mock({
'foo-mock.txt': 'foo'
'foo-mock.txt': 'foo',
});

fs.readFile('foo-mock.txt', 'utf8', function(err, str) {
fs.readFile('foo-mock.txt', 'utf8', function (err, str) {
assert.ifError(err);
assert.equal(str, 'foo');

Expand Down
8 changes: 4 additions & 4 deletions benchmarks/read-integration-real.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ const tmpPath = '.tmp';
* test time.
* @param {function(Error)} done Callback.
*/
exports.test = function(done) {
fs.mkdir(tmpPath, function(mkdirErr) {
exports.test = function (done) {
fs.mkdir(tmpPath, function (mkdirErr) {
assert.ifError(mkdirErr);
const tmpFile = path.join(tmpPath, 'foo-real.txt');
fs.writeFile(tmpFile, 'foo', function(writeErr) {
fs.writeFile(tmpFile, 'foo', function (writeErr) {
assert.ifError(writeErr);
fs.readFile(tmpFile, 'utf8', function(readErr, str) {
fs.readFile(tmpFile, 'utf8', function (readErr, str) {
assert.ifError(readErr);
assert.equal(str, 'foo');
rimraf(tmpPath, done);
Expand Down
10 changes: 5 additions & 5 deletions benchmarks/read-mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ const mock = require('..');
/**
* Test setup. Not timed.
*/
exports.beforeEach = function() {
exports.beforeEach = function () {
mock({
'foo-mock.txt': 'foo'
'foo-mock.txt': 'foo',
});
};

/**
* Timed test.
* @param {function(Error)} done Callback.
*/
exports.test = function(done) {
fs.readFile('foo-mock.txt', 'utf8', function(err, str) {
exports.test = function (done) {
fs.readFile('foo-mock.txt', 'utf8', function (err, str) {
assert.ifError(err);
assert.equal(str, 'foo');
done();
Expand All @@ -27,6 +27,6 @@ exports.test = function(done) {
/**
* Test teardown. Not timed.
*/
exports.afterEach = function() {
exports.afterEach = function () {
mock.restore();
};
10 changes: 5 additions & 5 deletions benchmarks/read-real.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const tmpPath = '.tmp';
* Test setup. Not timed.
* @param {function(Error)} done Callback.
*/
exports.beforeEach = function(done) {
fs.mkdir(tmpPath, function(err) {
exports.beforeEach = function (done) {
fs.mkdir(tmpPath, function (err) {
if (err) {
return done(err);
}
Expand All @@ -23,8 +23,8 @@ exports.beforeEach = function(done) {
* Timed test.
* @param {function(Error)} done Callback.
*/
exports.test = function(done) {
fs.readFile(path.join(tmpPath, 'foo-real.txt'), 'utf8', function(err, str) {
exports.test = function (done) {
fs.readFile(path.join(tmpPath, 'foo-real.txt'), 'utf8', function (err, str) {
assert.ifError(err);
assert.equal(str, 'foo');
done();
Expand All @@ -35,6 +35,6 @@ exports.test = function(done) {
* Test teardown. Not timed.
* @param {function(Error)} done Callback.
*/
exports.afterEach = function(done) {
exports.afterEach = function (done) {
rimraf(tmpPath, done);
};
4 changes: 2 additions & 2 deletions benchmarks/write-integration-mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ const mock = require('..');
* test time.
* @param {function(Error)} done Callback.
*/
exports.test = function(done) {
exports.test = function (done) {
mock();

fs.writeFile('foo-mock.txt', 'foo', function(err) {
fs.writeFile('foo-mock.txt', 'foo', function (err) {
assert.ifError(err);

mock.restore();
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/write-integration-real.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const tmpPath = '.tmp';
* test time.
* @param {function(Error)} done Callback.
*/
exports.test = function(done) {
fs.mkdir(tmpPath, function(mkdirErr) {
exports.test = function (done) {
fs.mkdir(tmpPath, function (mkdirErr) {
assert.ifError(mkdirErr);
fs.writeFile(path.join(tmpPath, 'foo-real.txt'), 'foo', function(err) {
fs.writeFile(path.join(tmpPath, 'foo-real.txt'), 'foo', function (err) {
assert.ifError(err);
rimraf(tmpPath, done);
});
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/write-mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ const mock = require('..');
/**
* Test setup. Not timed.
*/
exports.beforeEach = function() {
exports.beforeEach = function () {
mock();
};

/**
* Timed test.
* @param {function(Error)} done Callback.
*/
exports.test = function(done) {
exports.test = function (done) {
fs.writeFile('foo-mock.txt', 'foo', done);
};

/**
* Test teardown. Not timed.
*/
exports.afterEach = function() {
exports.afterEach = function () {
mock.restore();
};
6 changes: 3 additions & 3 deletions benchmarks/write-real.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ const tmpPath = '.tmp';
* Test setup. Not timed.
* @param {function(Error)} done Callback.
*/
exports.beforeEach = function(done) {
exports.beforeEach = function (done) {
fs.mkdir(tmpPath, done);
};

/**
* Timed test.
* @param {function(Error)} done Callback.
*/
exports.test = function(done) {
exports.test = function (done) {
fs.writeFile(path.join(tmpPath, 'foo-real.txt'), 'foo', done);
};

/**
* Test teardown. Not timed.
* @param {function(Error)} done Callback.
*/
exports.afterEach = function(done) {
exports.afterEach = function (done) {
rimraf(tmpPath, done);
};
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## Next release

* Fix for BigInt stats in Node 18.7 (thanks @3cp, see [#361][#361])

## 5.1.2

* Avoid open `FSREQCALLBACK` file handles (thanks @jloleysens, see [#342][#342])
Expand Down Expand Up @@ -334,3 +338,4 @@ Detailed changes:
[#335]: https://github.com/tschaub/mock-fs/pull/335
[#337]: https://github.com/tschaub/mock-fs/pull/337
[#342]: https://github.com/tschaub/mock-fs/pull/342
[#361]: https://github.com/tschaub/mock-fs/pull/361
Loading