diff --git a/scripts/tools-generator/__tests__/openClaw-formatter.test.js b/scripts/tools-generator/__tests__/openClaw-formatter.test.js index 021ecdbbe..f566a72a5 100644 --- a/scripts/tools-generator/__tests__/openClaw-formatter.test.js +++ b/scripts/tools-generator/__tests__/openClaw-formatter.test.js @@ -2,7 +2,8 @@ * Unit tests for the OpenClaw formatter. * Tests markdown generation, tool formatting, and categorization. */ -import { describe, expect, it } from 'vitest'; +import assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; import { ENVIRONMENTS, @@ -13,6 +14,21 @@ import { TOOL_CATEGORIES, } from '../openClaw-formatter.js'; +const expect = (actual) => ({ + toBe(expected) { + assert.equal(actual, expected); + }, + toContain(expected) { + assert.ok(actual.includes(expected), `Expected value to include: ${expected}`); + }, + toHaveLength(expected) { + assert.equal(actual.length, expected); + }, + toHaveProperty(expected) { + assert.ok(Object.hasOwn(actual, expected), `Expected object to include property: ${expected}`); + }, +}); + describe('OpenClaw Formatter', () => { describe('formatParameters', () => { it('should format parameters correctly', () => {