1+ import "@testing-library/jest-dom" ;
2+
13import * as fs from "fs" ;
24import * as path from "path" ;
35import * as JSON5 from "json5" ;
46import { loadJson , deepClone } from "../src/utils/json" ;
7+ import { describe , it , expect } from "vitest" ;
58
69// Path to the example page JSON file
710const PAGE_PATH = path . resolve ( __dirname , "../../schema/page/ex1_success.json" ) ;
@@ -19,7 +22,7 @@ describe("JSON-DOC Utilities", () => {
1922 }
2023 }
2124
22- test ( "should load JSON correctly" , ( ) => {
25+ it ( "should load JSON correctly" , ( ) => {
2326 const testData = { hello : "world" , nested : { value : 42 } } ;
2427 const jsonString = JSON . stringify ( testData ) ;
2528
@@ -32,7 +35,7 @@ describe("JSON-DOC Utilities", () => {
3235 expect ( loadedObj ) . toEqual ( testData ) ;
3336 } ) ;
3437
35- test ( "should deep clone objects" , ( ) => {
38+ it ( "should deep clone objects" , ( ) => {
3639 const original = {
3740 hello : "world" ,
3841 nested : { value : 42 , array : [ 1 , 2 , 3 ] } ,
@@ -52,7 +55,7 @@ describe("JSON-DOC Utilities", () => {
5255 expect ( original . nested . value ) . toBe ( 42 ) ;
5356 } ) ;
5457
55- test ( "should load example page from schema" , ( ) => {
58+ it ( "should load example page from schema" , ( ) => {
5659 // Load the example page from the schema
5760 const content = loadJsonFile ( PAGE_PATH ) ;
5861
0 commit comments