ui.test.ts
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { registerAsUiLib } from '@/scripts/aiscript/ui.js';
|
|
||||||
import { errors, Interpreter, Parser, values } from '@syuilo/aiscript';
|
import { errors, Interpreter, Parser, values } from '@syuilo/aiscript';
|
||||||
import { describe, expect, test } from 'vitest';
|
import { describe, expect, test } from 'vitest';
|
||||||
import { type Ref, ref } from 'vue';
|
import { type Ref, ref } from 'vue';
|
||||||
@@ -20,12 +19,14 @@ import type {
|
|||||||
AsUiTextarea,
|
AsUiTextarea,
|
||||||
AsUiTextInput,
|
AsUiTextInput,
|
||||||
} from '@/scripts/aiscript/ui.js';
|
} from '@/scripts/aiscript/ui.js';
|
||||||
|
import { registerAsUiLib } from '@/scripts/aiscript/ui.js';
|
||||||
|
|
||||||
type ExeResult = {
|
type ExeResult = {
|
||||||
root: AsUiRoot;
|
root: AsUiRoot;
|
||||||
get: (id: string) => AsUiComponent;
|
get: (id: string) => AsUiComponent;
|
||||||
outputs: values.Value[];
|
outputs: values.Value[];
|
||||||
}
|
}
|
||||||
|
|
||||||
async function exe(script: string): Promise<ExeResult> {
|
async function exe(script: string): Promise<ExeResult> {
|
||||||
const rootRef = ref<AsUiRoot>();
|
const rootRef = ref<AsUiRoot>();
|
||||||
const componentRefs = ref<Ref<AsUiComponent>[]>([]);
|
const componentRefs = ref<Ref<AsUiComponent>[]>([]);
|
||||||
|
|||||||
Reference in New Issue
Block a user