mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 13:32:23 +00:00
test(scripts): run OpenClaw formatter tests without vitest (#3063)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
This commit is contained in:
co-authored by
Steven Enamakel
parent
e4cb9ab717
commit
51a1d1b034
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user