diff --git a/test/lineCounter.js b/test/lineCounter.js index 5d2e59a26ff..1fb8a37be0c 100644 --- a/test/lineCounter.js +++ b/test/lineCounter.js @@ -1,8 +1,8 @@ -const fs = require('fs'); +const fs = require('../src/utils/fs'); const assert = require('assert'); const lineCounter = require('../src/utils/lineCounter'); -describe('line counter', () => { +describe('line counter', async function() { it('counts number of lines of a string', () => { const input = ` line 1 line 2 @@ -11,8 +11,8 @@ describe('line counter', () => { assert(lineCounter(input) === 3); }); - it('counts number of lines of a file from disk', () => { - const input = fs.readFileSync('./test/lineCounter.js').toString(); + it('counts number of lines of a file from disk', async function() { + const input = (await fs.readFile('./test/lineCounter.js')).toString(); assert(lineCounter(input) === 19); }); });