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

Commit

Permalink
refactor(test): add homogeneity on mock fs
Browse files Browse the repository at this point in the history
Use filesystem helper
  • Loading branch information
stephanebachelier committed Apr 7, 2015
1 parent c7e6be5 commit b613a24
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/test-config-writer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';
var fs = require('fs');
var path = require('path');
var assert = require('assert');
var helpers = require('./helpers');
Expand Down Expand Up @@ -116,9 +115,9 @@ describe('ConfigWriter', function () {

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

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

// process file
c.process(file);
Expand Down

0 comments on commit b613a24

Please sign in to comment.