refactor: make fs shim a commonjs module to match node.js fs module

This commit is contained in:
Ben Heidemann 2021-04-18 15:44:22 +01:00 committed by David Humphrey
parent 11e05e131b
commit b3caddcfec
2 changed files with 2 additions and 5 deletions

View File

@ -62,7 +62,4 @@ const fs = new Proxy(fsInstance, {
}, },
}); });
module.exports = { module.exports = fs;
__esModule: true,
default: fs,
};

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
const expect = require('chai').expect; const expect = require('chai').expect;
const utils = require('../../lib/test-utils'); const utils = require('../../lib/test-utils');
const fs = utils.shimIndexedDB(() => require('../../../shims/fs').default); const fs = utils.shimIndexedDB(() => require('../../../shims/fs'));
describe('fs shim', () => { describe('fs shim', () => {
it('should be defined', () => { it('should be defined', () => {