From 1ee9f1fde47c6177d351fbf804602b78cb3c988e Mon Sep 17 00:00:00 2001 From: Ben Heidemann Date: Sat, 3 Apr 2021 18:02:50 +0100 Subject: [PATCH] test: update fs spec to import fs module instead of shim --- tests/spec/shims/fs.spec.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/spec/shims/fs.spec.js b/tests/spec/shims/fs.spec.js index b4ee04b..fca9f01 100644 --- a/tests/spec/shims/fs.spec.js +++ b/tests/spec/shims/fs.spec.js @@ -1,7 +1,7 @@ 'use strict'; const expect = require('chai').expect; const utils = require('../../lib/test-utils'); -const fs = utils.shimIndexedDB(() => require('../../../shims/fs').default); +import fs from 'fs'; describe('fs shim', () => { it('should be defined', () => { @@ -17,10 +17,12 @@ describe('fs shim', () => { }); it('should call callback when calling fs.writeFile', (done) => { - fs.writeFile('/test.txt', 'test', function(err) { - if(err) throw err; + utils.shimIndexedDB(() => { + fs.writeFile('/test.txt', 'test', function(err) { + if(err) throw err; - done(); + done(); + }); }); });