Skip to content

Commit 47f0c61

Browse files
committed
Fix cs issue in test
1 parent f3f0cee commit 47f0c61

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

src/lib/Actions.test.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,18 @@ describe(
7474
const baseItem = {
7575
field: 'value'
7676
};
77-
const callback = (item?: object | undefined): boolean => {
77+
const callback = (item?: unknown): void => {
7878
called = true;
7979
// @ts-ignore
8080
item.field = 'newValue';
81-
return called;
8281
};
8382
const action = new CallbackAction('', null, callback);
8483

85-
expect(action.call(baseItem)).toBe(true);
84+
expect(called).toBe(false);
85+
86+
action.call(baseItem);
87+
88+
expect(called).toBe(true);
8689
expect(baseItem.field).toBe('newValue');
8790
});
8891
},

test_cli.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { load_config } from './node_modules/@sveltejs/kit/src/core/config/index.js';
2+
import { all } from './node_modules/@sveltejs/kit/src/core/sync/sync.js';
3+
4+
(async () => {
5+
console.info('Testing.');
6+
7+
const conf = await load_config();
8+
9+
const manifest_data = all(conf, 'development');
10+
11+
const routes = manifest_data.manifest_data.routes;
12+
13+
console.info(routes);
14+
})();

0 commit comments

Comments
 (0)