Skip to content

Commit dce5563

Browse files
committed
Create logs directory for tests to run
fixes: #3
1 parent b572de6 commit dce5563

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"bunyan": "1.8.15",
1818
"eslint": "7.21.0",
1919
"eslint-plugin-ghost": "2.0.0",
20+
"mkdirp": "^1.0.4",
2021
"mocha": "8.2.1",
2122
"should": "13.2.3",
2223
"sinon": "9.2.4"

test/filerotate.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ const sinon = require('sinon');
22
const assert = require('assert');
33
const sandbox = sinon.createSandbox();
44
const bunyan = require('bunyan');
5+
const path = require('path');
6+
const mkdirp = require('mkdirp');
57

68
const RotatingFileStream = require('../index');
79
const testConfig = {
@@ -13,6 +15,10 @@ const testConfig = {
1315
};
1416

1517
describe('RotatingFileStream', function () {
18+
before(async function () {
19+
await mkdirp(path.parse(testConfig.path).dir);
20+
});
21+
1622
afterEach(function () {
1723
sandbox.restore();
1824
});

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,11 @@ mkdirp@^0.5.1, mkdirp@~0.5.1:
10471047
dependencies:
10481048
minimist "^1.2.5"
10491049

1050+
mkdirp@^1.0.4:
1051+
version "1.0.4"
1052+
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
1053+
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
1054+
10501055
10511056
version "8.2.1"
10521057
resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.1.tgz#f2fa68817ed0e53343d989df65ccd358bc3a4b39"

0 commit comments

Comments
 (0)