4
4
createRandomVertex ,
5
5
createRandomVertexForRdf ,
6
6
DbState ,
7
- renderHookWithRecoilRoot ,
7
+ renderHookWithJotai ,
8
8
} from "@/utils/testing" ;
9
9
import { useAddToGraph } from "./useAddToGraph" ;
10
10
import { act } from "react" ;
@@ -39,7 +39,7 @@ test("should add one node", async () => {
39
39
Promise . resolve ( toNodeMap ( [ vertex ] ) )
40
40
) ;
41
41
42
- const { result } = renderHookWithRecoilRoot ( ( ) => {
42
+ const { result } = renderHookWithJotai ( ( ) => {
43
43
const callback = useAddToGraph ( ) ;
44
44
const vertices = useAtomValue ( nodesAtom ) ;
45
45
const edges = useAtomValue ( edgesAtom ) ;
@@ -65,7 +65,7 @@ test("should materialize fragment vertices", async () => {
65
65
Promise . resolve ( toNodeMap ( [ clonedVertex ] ) )
66
66
) ;
67
67
68
- const { result } = renderHookWithRecoilRoot ( ( ) => {
68
+ const { result } = renderHookWithJotai ( ( ) => {
69
69
const callback = useAddToGraph ( ) ;
70
70
const vertices = useAtomValue ( nodesAtom ) ;
71
71
const edges = useAtomValue ( edgesAtom ) ;
@@ -90,7 +90,7 @@ test("should add one edge", async () => {
90
90
Promise . resolve ( toNodeMap ( [ node1 , node2 ] ) )
91
91
) ;
92
92
93
- const { result } = renderHookWithRecoilRoot (
93
+ const { result } = renderHookWithJotai (
94
94
( ) => {
95
95
const callback = useAddToGraph ( ) ;
96
96
const vertices = useAtomValue ( nodesAtom ) ;
@@ -118,7 +118,7 @@ test("should add multiple nodes and edges", async () => {
118
118
Promise . resolve ( randomEntities . nodes )
119
119
) ;
120
120
121
- const { result } = renderHookWithRecoilRoot ( ( ) => {
121
+ const { result } = renderHookWithJotai ( ( ) => {
122
122
const callback = useAddToGraph ( ) ;
123
123
const vertices = useAtomValue ( nodesAtom ) ;
124
124
const edges = useAtomValue ( edgesAtom ) ;
@@ -153,7 +153,7 @@ test("should update schema when adding a node", async () => {
153
153
Promise . resolve ( toNodeMap ( [ vertex ] ) )
154
154
) ;
155
155
156
- const { result } = renderHookWithRecoilRoot (
156
+ const { result } = renderHookWithJotai (
157
157
( ) => {
158
158
const callback = useAddToGraph ( ) ;
159
159
const vertices = useAtomValue ( nodesAtom ) ;
@@ -186,7 +186,7 @@ test("should update schema when adding a node with no label", async () => {
186
186
Promise . resolve ( toNodeMap ( [ vertex ] ) )
187
187
) ;
188
188
189
- const { result } = renderHookWithRecoilRoot (
189
+ const { result } = renderHookWithJotai (
190
190
( ) => {
191
191
const callback = useAddToGraph ( ) ;
192
192
const vertices = useAtomValue ( nodesAtom ) ;
@@ -221,7 +221,7 @@ test("should update schema when adding an edge", async () => {
221
221
Promise . resolve ( toNodeMap ( [ node1 , node2 ] ) )
222
222
) ;
223
223
224
- const { result } = renderHookWithRecoilRoot (
224
+ const { result } = renderHookWithJotai (
225
225
( ) => {
226
226
const callback = useAddToGraph ( ) ;
227
227
const vertices = useAtomValue ( nodesAtom ) ;
@@ -259,7 +259,7 @@ test("should add missing attributes to the schema when adding a node", async ()
259
259
Promise . resolve ( toNodeMap ( [ vertex ] ) )
260
260
) ;
261
261
262
- const { result } = renderHookWithRecoilRoot (
262
+ const { result } = renderHookWithJotai (
263
263
( ) => {
264
264
const callback = useAddToGraph ( ) ;
265
265
const vertices = useAtomValue ( nodesAtom ) ;
@@ -301,7 +301,7 @@ test("should add missing attributes to the schema when adding an edge", async ()
301
301
Promise . resolve ( toNodeMap ( [ node1 , node2 ] ) )
302
302
) ;
303
303
304
- const { result } = renderHookWithRecoilRoot (
304
+ const { result } = renderHookWithJotai (
305
305
( ) => {
306
306
const callback = useAddToGraph ( ) ;
307
307
const vertices = useAtomValue ( nodesAtom ) ;
@@ -331,7 +331,7 @@ test("should update graph storage when adding a node", async () => {
331
331
Promise . resolve ( toNodeMap ( [ vertex ] ) )
332
332
) ;
333
333
334
- const { result } = renderHookWithRecoilRoot (
334
+ const { result } = renderHookWithJotai (
335
335
( ) => {
336
336
const callback = useAddToGraph ( ) ;
337
337
const graph = useAtomValue ( activeGraphSessionAtom ) ;
@@ -365,7 +365,7 @@ test("should update graph storage when adding an edge", async () => {
365
365
Promise . resolve ( toNodeMap ( [ node1 , node2 ] ) )
366
366
) ;
367
367
368
- const { result } = renderHookWithRecoilRoot (
368
+ const { result } = renderHookWithJotai (
369
369
( ) => {
370
370
const callback = useAddToGraph ( ) ;
371
371
const graph = useAtomValue ( activeGraphSessionAtom ) ;
@@ -398,7 +398,7 @@ test("should ignore blank nodes when updating graph storage", async () => {
398
398
Promise . resolve ( toNodeMap ( [ vertex , blankNode ] ) )
399
399
) ;
400
400
401
- const { result } = renderHookWithRecoilRoot (
401
+ const { result } = renderHookWithJotai (
402
402
( ) => {
403
403
const callback = useAddToGraph ( ) ;
404
404
const graph = useAtomValue ( activeGraphSessionAtom ) ;
0 commit comments