Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit 7f1592c

Browse files
refactor(test): add homogeneity on mock fs
Use filesystem helper
1 parent 82849fe commit 7f1592c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/test-config-writer.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
'use strict';
2-
var fs = require('fs');
32
var path = require('path');
43
var assert = require('assert');
54
var helpers = require('./helpers');
@@ -116,9 +115,9 @@ describe('ConfigWriter', function () {
116115

117116
this.warnMessage = ''; // clear log output
118117

119-
// create file
120-
fs.mkdirSync('warn-missing');
121-
fs.writeFileSync(path.join('warn-missing', 'foo.js'), 'var a=1;');
118+
// mock file
119+
helpers.file.mkdir('warn-missing');
120+
helpers.file.write(path.join('warn-missing', 'foo.js'), 'var a=1;');
122121

123122
// process file
124123
c.process(file);

0 commit comments

Comments
 (0)