test: update fs spec to import fs module instead of shim
This commit is contained in:
parent
5857f1a65f
commit
1ee9f1fde4
|
@ -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);
|
import fs from 'fs';
|
||||||
|
|
||||||
describe('fs shim', () => {
|
describe('fs shim', () => {
|
||||||
it('should be defined', () => {
|
it('should be defined', () => {
|
||||||
|
@ -17,10 +17,12 @@ describe('fs shim', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call callback when calling fs.writeFile', (done) => {
|
it('should call callback when calling fs.writeFile', (done) => {
|
||||||
fs.writeFile('/test.txt', 'test', function(err) {
|
utils.shimIndexedDB(() => {
|
||||||
if(err) throw err;
|
fs.writeFile('/test.txt', 'test', function(err) {
|
||||||
|
if(err) throw err;
|
||||||
|
|
||||||
done();
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue