Skip to content

Commit 6a8fe4d

Browse files
authored
Fixed disabled VFS tests (#185)
Fixes VFS tests that were commented out due to assertion issues relating to null byte characters not visible in console output, hence not caught.
1 parent 888b8b9 commit 6a8fe4d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

__tests__/utils/vfs.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,10 @@ describe('utils.vfs#transformArrayBuffer', () => {
194194
const testAbString = ab2str(testAb);
195195
const create = type => vfs.transformArrayBuffer(testAb, 'text/plain', type);
196196

197-
/* FIXME
198197
test('Should create string', () =>
199198
create('string')
200-
.then(result => expect(result).toBe('foo')));
201-
*/
199+
.then(result => result.replace(/\0/g, ''))
200+
.then(result => expect(result).toBe(testText)));
202201

203202
test('Should create data url', async () => {
204203
const result = await create('uri');
@@ -210,12 +209,11 @@ describe('utils.vfs#transformArrayBuffer', () => {
210209
expect(index).not.toBe(-1);
211210
});
212211

213-
/* FIXME
214212
test('Should create blob', () =>
215213
create('blob')
216214
.then(blob2str)
215+
.then(result => result.replace(/\0/g, ''))
217216
.then(result => expect(result).toBe(testText)));
218-
*/
219217

220218
test('Should create arraybuffer (default)', () =>
221219
create('arraybuffer')

0 commit comments

Comments
 (0)