Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia committed Jan 21, 2025
1 parent e91db61 commit 72c3574
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion packages/runtime-kit/src/dataLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ export function setFetcher(customFetcher: RunClientAppOptions['dataLoaderFetcher
/**
* Custom decorator for deal with data loader.
*/
let dataLoaderDecorator: RunClientAppOptions['dataLoaderDecorator'];
// @ts-ignore
let dataLoaderDecorator: RunClientAppOptions['dataLoaderDecorator'] = (dataLoader) => {
return dataLoader;
};
export function setDecorator(customDecorator: RunClientAppOptions['dataLoaderDecorator']): void {
dataLoaderDecorator = customDecorator;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/tests/appConfig.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, it, describe } from 'vitest';
import getAppConfig, { defineAppConfig } from '../src/appConfig.js';
import { getAppConfig, defineAppConfig } from '@ice/runtime-kit';

describe('AppConfig', () => {
it('getAppConfig', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/runtime/tests/routes.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ describe('routes', () => {
});

it('load async route', async () => {
process.env.ICE_CORE_ROUTER = 'true';
const { data: deferredResult } = await createRouteLoader({
routeId: 'home',
module: InfoItem,
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/tests/templateParse.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { expect, it, describe, beforeEach, afterEach, vi } from 'vitest';
import { parseTemplate } from '../src/dataLoader';
import { parseTemplate } from '@ice/runtime-kit';

describe('parseTemplate', () => {
let locationSpy;
Expand Down Expand Up @@ -128,4 +128,4 @@ describe('parseTemplate', () => {
ext_headers: {},
});
});
});
});

0 comments on commit 72c3574

Please sign in to comment.