Skip to content

Commit e814b60

Browse files
authored
Update packages/kit/test/prerendering/basics/test/test.js
1 parent 94f0707 commit e814b60

File tree

1 file changed

+3
-14
lines changed
  • packages/kit/test/prerendering/basics/test

1 file changed

+3
-14
lines changed

packages/kit/test/prerendering/basics/test/test.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,9 @@ test('targets the data-sveltekit-hydrate parent node', () => {
144144
);
145145
});
146146

147-
test('check binary data not corrupted - jpg', async () => {
148-
const newFile = readNoUtf('fetch-image/image.jpg');
149-
const orgFile = readNoUtf('image.jpg');
150-
const compare = Buffer.compare(newFile, orgFile);
151-
152-
assert.ok(compare === 0);
153-
});
154-
155-
test('check binary files not corrupted - png', async () => {
156-
const newFile = readNoUtf('fetch-image/image.png');
157-
const orgFile = readNoUtf('image.png');
158-
const compare = Buffer.compare(newFile, orgFile);
159-
160-
assert.ok(compare === 0);
147+
test('prerenders binary data', async () => {
148+
assert.equal(Buffer.compare(read('fetch-image/image.jpg', null), read('image.jpg', null)), 0);
149+
assert.equal(Buffer.compare(read('fetch-image/image.png', null), read('image.png', null)), 0);
161150
});
162151

163152
test.run();

0 commit comments

Comments
 (0)