Skip to content

Commit 07298ab

Browse files
committed
Fix tests
1 parent ea54b7f commit 07298ab

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/flat_file.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ test('Check two text files', async () => {
137137
test('Check one image 16x16px file', async () => {
138138
const imageSize: ISize = { width: 170, height: 50 };
139139
const oldImageUtils = getImageUtils();
140-
registerImageUtils({ getImageInfo: async (url) => { return { imageData: url, ...imageSize }; },
141-
applyImageFit: async (imageInfo) => { return imageInfo; } });
140+
registerImageUtils({ getImageInfo: async (url) => { return { data: url, ...imageSize }; },
141+
applyImageFit: async (imageInfo) => { return imageInfo; }, clear: () => {} });
142142
const json: any = {
143143
elements: [
144144
{
@@ -175,8 +175,8 @@ test('Check one image 16x16px file', async () => {
175175
test('Check one image 16x16px file shorter than text', async () => {
176176
const imageSize: ISize = { width: 50, height: 50 };
177177
const oldImageUtils = getImageUtils();
178-
registerImageUtils({ getImageInfo: async (url) => { return { imageData: url, ...imageSize }; },
179-
applyImageFit: async (imageInfo) => { return imageInfo; } });
178+
registerImageUtils({ getImageInfo: async (url) => { return { data: url, ...imageSize }; },
179+
applyImageFit: async (imageInfo) => { return imageInfo; }, clear: () => {} });
180180
const json: any = {
181181
elements: [
182182
{
@@ -213,8 +213,8 @@ test('Check one image 16x16px file shorter than text', async () => {
213213
test('Check one image 16x16px with set size', async () => {
214214
const imageSize: ISize = { width: 50, height: 50 };
215215
const oldImageUtils = getImageUtils();
216-
registerImageUtils({ getImageInfo: async (url) => { return { imageData: url, ...imageSize }; },
217-
applyImageFit: async (imageInfo) => { return imageInfo; } });
216+
registerImageUtils({ getImageInfo: async (url) => { return { data: url, ...imageSize }; },
217+
applyImageFit: async (imageInfo) => { return imageInfo; }, clear: () => {} });
218218
const json: any = {
219219
elements: [
220220
{

tests/flat_image.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ test('Check image question 100x100px', async () => {
4545

4646
test('Check image question with "auto"', async () => {
4747
const oldImageUtils = getImageUtils();
48-
registerImageUtils({ getImageInfo: async (url) => { return { imageData: url, width: 100, height: 75 }; },
49-
applyImageFit: async (imageInfo) => { return imageInfo; } });
48+
registerImageUtils({ getImageInfo: async (url) => { return { data: url, width: 100, height: 75 }; },
49+
applyImageFit: async (imageInfo) => { return imageInfo; }, clear: () => {} });
5050
const json: any = {
5151
elements: [
5252
{
@@ -98,8 +98,8 @@ test('Check image question with "auto"', async () => {
9898

9999
test('Check image question with "auto" and 100%', async () => {
100100
const oldImageUtils = getImageUtils();
101-
registerImageUtils({ getImageInfo: async (url) => { return { imageData: url, width: 100, height: 75 }; },
102-
applyImageFit: async (imageInfo) => { return imageInfo; } });
101+
registerImageUtils({ getImageInfo: async (url) => { return { data: url, width: 100, height: 75 }; },
102+
applyImageFit: async (imageInfo) => { return imageInfo; }, clear: () => {} });
103103
const json: any = {
104104
elements: [
105105
{

0 commit comments

Comments
 (0)