Bin
2025-12-17 21f0498f62ada55651f4d232327e15fc47f498b1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* global test, expect */
import TaskStore from "../TaskStore";
 
test("Task Store with string", () => {
  const initialState = {
    id: 1,
    data: '{"url": "https://heartex.net"}',
    project: 100,
  };
 
  const taskStore = TaskStore.create(initialState);
 
  expect(taskStore.dataObj).toEqual({ url: "https://heartex.net" });
});
 
// test("Task Store JSON", () => {
//   const initialState = {
//     id: 1,
//     data: {url: "https://heartex.net"},
//     project: 100,
//   };
 
//   const taskStore = TaskStore.create(initialState);
 
//   expect(taskStore.dataObj).toEqual({ url: "https://heartex.net" });
// })
 
// test("Task Store bad value", () => {
//   const initialState = {
//     id: 1,
//     data: "Not JSON",
//     project: 100,
//   };
 
//   const taskStore = TaskStore.create(initialState);
 
//   expect(taskStore.dataObj).toEqual(null);
// })