Skip to content

Commit 3a42f2e

Browse files
committed
chore(workflow): migrate yaml-cleanup test added on main to rstest
The rebase onto main brought in yaml-cleanup.test.ts, which still imported from vitest. Swap the imports and vi.fn() usage to the rstest equivalents used across the rest of the core suite.
1 parent 12ab514 commit 3a42f2e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/core/tests/unit-test/yaml-cleanup.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Agent } from '@/agent/agent';
22
import { runFreeFnCleanup } from '@/yaml/cleanup';
33
import { ScriptPlayer } from '@/yaml/player';
4-
import { describe, expect, test, vi } from 'vitest';
4+
import { describe, expect, rstest as rs, test } from '@rstest/core';
55

66
describe('YAML resource cleanup', () => {
77
test('runs cleanup functions in declared order and attempts all of them', async () => {
@@ -41,7 +41,7 @@ describe('YAML resource cleanup', () => {
4141
test('ScriptPlayer rejects when resource cleanup fails', async () => {
4242
const cleanupError = new Error('cleanup failed');
4343
const agent = {
44-
getActionSpace: vi.fn().mockResolvedValue([]),
44+
getActionSpace: rs.fn().mockResolvedValue([]),
4545
} as unknown as Agent;
4646
const player = new ScriptPlayer({ tasks: [] }, async () => ({
4747
agent,

0 commit comments

Comments
 (0)