1
- import { test } from "uvu " ;
2
- import * as assert from "uvu/ assert" ;
1
+ import test from "node:test " ;
2
+ import assert from "node: assert" ;
3
3
import diff from "../dist/index.js" ;
4
4
5
5
test ( "new NaN value in object" , ( ) => {
6
- assert . equal ( diff ( { } , { testNaN : NaN } ) , [
6
+ assert . deepStrictEqual ( diff ( { } , { testNaN : NaN } ) , [
7
7
{
8
8
type : "CREATE" ,
9
9
path : [ "testNaN" ] ,
@@ -12,7 +12,7 @@ test("new NaN value in object", () => {
12
12
] ) ;
13
13
} ) ;
14
14
test ( "change NaN value in object" , ( ) => {
15
- assert . equal ( diff ( { testNaN : NaN } , { testNaN : 0 } ) , [
15
+ assert . deepStrictEqual ( diff ( { testNaN : NaN } , { testNaN : 0 } ) , [
16
16
{
17
17
type : "CHANGE" ,
18
18
path : [ "testNaN" ] ,
@@ -22,10 +22,10 @@ test("change NaN value in object", () => {
22
22
] ) ;
23
23
} ) ;
24
24
test ( "do not change NaN value in object" , ( ) => {
25
- assert . equal ( diff ( { testNaN : NaN } , { testNaN : NaN } ) , [ ] ) ;
25
+ assert . deepStrictEqual ( diff ( { testNaN : NaN } , { testNaN : NaN } ) , [ ] ) ;
26
26
} ) ;
27
27
test ( "remove NaN value in object" , ( ) => {
28
- assert . equal ( diff ( { testNaN : NaN } , { } ) , [
28
+ assert . deepStrictEqual ( diff ( { testNaN : NaN } , { } ) , [
29
29
{
30
30
type : "REMOVE" ,
31
31
path : [ "testNaN" ] ,
@@ -34,7 +34,7 @@ test("remove NaN value in object", () => {
34
34
] ) ;
35
35
} ) ;
36
36
test ( "new NaN value in array" , ( ) => {
37
- assert . equal ( diff ( [ ] , [ NaN ] ) , [
37
+ assert . deepStrictEqual ( diff ( [ ] , [ NaN ] ) , [
38
38
{
39
39
type : "CREATE" ,
40
40
path : [ 0 ] ,
@@ -43,7 +43,7 @@ test("new NaN value in array", () => {
43
43
] ) ;
44
44
} ) ;
45
45
test ( "change NaN value in object" , ( ) => {
46
- assert . equal ( diff ( [ NaN ] , [ 0 ] ) , [
46
+ assert . deepStrictEqual ( diff ( [ NaN ] , [ 0 ] ) , [
47
47
{
48
48
type : "CHANGE" ,
49
49
path : [ 0 ] ,
@@ -53,16 +53,5 @@ test("change NaN value in object", () => {
53
53
] ) ;
54
54
} ) ;
55
55
test ( "do not change NaN value in array" , ( ) => {
56
- assert . equal ( diff ( [ NaN ] , [ NaN ] ) , [ ] ) ;
56
+ assert . deepStrictEqual ( diff ( [ NaN ] , [ NaN ] ) , [ ] ) ;
57
57
} ) ;
58
- test ( "remove NaN value in array" , ( ) => {
59
- assert . equal ( diff ( [ NaN ] , [ ] ) , [
60
- {
61
- type : "REMOVE" ,
62
- path : [ 0 ] ,
63
- oldValue : NaN ,
64
- } ,
65
- ] ) ;
66
- } ) ;
67
-
68
- test . run ( ) ;
0 commit comments