1
0
mirror of synced 2026-03-24 03:38:34 +08:00

chore(core,data-source): 将app传入datasourceManager

This commit is contained in:
roymondchen
2023-08-25 17:39:37 +08:00
parent 8c93d9a5be
commit 7f48b4d9f5
6 changed files with 74 additions and 80 deletions

View File

@@ -1,6 +1,7 @@
import { describe, expect, test } from 'vitest';
import { MApp, MNode, NodeType } from '@tmagic/schema';
import Core from '@tmagic/core';
import { MApp, NodeType } from '@tmagic/schema';
import { createDataSourceManager, DataSourceManager } from '@data-source/index';
@@ -37,13 +38,14 @@ const dsl: MApp = {
name: 'text',
},
],
methods: [],
},
],
};
describe('createDataSourceManager', () => {
test('instance', () => {
const manager = createDataSourceManager(dsl, (node: MNode) => node, {});
const manager = createDataSourceManager(new Core({ config: dsl }));
expect(manager).toBeInstanceOf(DataSourceManager);
});
});