@@ -4,11 +4,12 @@ import("reflect-metadata"); // Polyfill
44import { assert } from "chai" ;
55import type { FriendSnake } from "./models/UserSnake" ;
66import { SnakeCaseNamingStrategy } from "../src" ;
7+ import { describe , it } from "node:test" ;
78
89describe ( "Naming strategies" , ( ) => {
910 it ( "deserialize must support snack case naming by fromJson parameters" , async ( ) => {
1011 const { UserSnake} = await import ( "./models/UserSnake" ) ;
11- const json = await import ( "./jsons/json-generator-snake.json" , { assert : { type : "json" } } ) ;
12+ const json = await import ( "./jsons/json-generator-snake.json" , { with : { type : "json" } } ) ;
1213 const [ object ] = Reflect . get ( json , "default" ) as typeof json ;
1314
1415 const user = new UserSnake ( ) . fromJSON (
@@ -45,7 +46,7 @@ describe("Naming strategies", () => {
4546
4647 it ( "deserialize must support snack case naming by jsonObject decorator" , async ( ) => {
4748 const { UserSnakeObject} = await import ( "./models/UserSnake" ) ;
48- const json = await import ( "./jsons/json-generator-snake.json" , { assert : { type : "json" } } ) ;
49+ const json = await import ( "./jsons/json-generator-snake.json" , { with : { type : "json" } } ) ;
4950 const [ object ] = Reflect . get ( json , "default" ) as typeof json ;
5051
5152 const user = new UserSnakeObject ( ) . fromJSON ( object ) ;
@@ -79,7 +80,7 @@ describe("Naming strategies", () => {
7980
8081 it ( "serializer must support snack case naming by jsonObject decorator" , async ( ) => {
8182 const { UserSnakeObject} = await import ( "./models/UserSnake" ) ;
82- const json = await import ( "./jsons/json-generator-snake.json" , { assert : { type : "json" } } ) ;
83+ const json = await import ( "./jsons/json-generator-snake.json" , { with : { type : "json" } } ) ;
8384 const [ object ] = Reflect . get ( json , "default" ) as typeof json ;
8485
8586 const user = new UserSnakeObject ( ) . fromJSON ( object ) ;
@@ -117,7 +118,7 @@ describe("Naming strategies", () => {
117118
118119 it ( "method fromJSON must support snack case naming by jsonName decorator" , async ( ) => {
119120 const { UserNaming} = await import ( "./models/UserName" ) ;
120- const json = await import ( "./jsons/user-naming.json" , { assert : { type : "json" } } ) ;
121+ const json = await import ( "./jsons/user-naming.json" , { with : { type : "json" } } ) ;
121122 const pjson = Reflect . get ( json , "default" ) as typeof json ;
122123
123124 const user = new UserNaming ( ) . fromJSON ( pjson ) ;
@@ -130,7 +131,7 @@ describe("Naming strategies", () => {
130131
131132 it ( "serializable must support deep copy with naming strategy" , async ( ) => {
132133 const { UserSnakeObject} = await import ( "./models/UserSnake" ) ;
133- const json = await import ( "./jsons/json-generator-snake.json" , { assert : { type : "json" } } ) ;
134+ const json = await import ( "./jsons/json-generator-snake.json" , { with : { type : "json" } } ) ;
134135 const [ object ] = Reflect . get ( json , "default" ) as typeof json ;
135136
136137 const user1 = new UserSnakeObject ( ) . fromJSON ( object ) ;
0 commit comments