Skip to content

Commit 4301996

Browse files
committed
test: Fix test
1 parent 681f528 commit 4301996

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/scheduler/cqid.test.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ test('setCQId - should set to random value if deterministicCQId is false', (t):
2727

2828
setCQId(resource, false, () => NIL_UUID);
2929

30-
t.is(resource.getColumnData(cqIDColumn.name).valid, true);
31-
t.is(resource.getColumnData(cqIDColumn.name).value.toString(), NIL_UUID);
30+
const cqId = resource.getColumnData(cqIDColumn.name);
31+
t.is(cqId.valid, true);
32+
t.is(cqId.toString(), NIL_UUID);
3233
});
3334

3435
test('setCQId - should set to random value if deterministicCQId is true and table does not have non _cq_id PKs', (t): void => {
@@ -50,8 +51,9 @@ test('setCQId - should set to random value if deterministicCQId is true and tabl
5051

5152
setCQId(resource, true, () => NIL_UUID);
5253

53-
t.is(resource.getColumnData(cqIDColumn.name).valid, true);
54-
t.is(resource.getColumnData(cqIDColumn.name).value.toString(), NIL_UUID);
54+
const cqId = resource.getColumnData(cqIDColumn.name);
55+
t.is(cqId.valid, true);
56+
t.is(cqId.toString(), NIL_UUID);
5557
});
5658

5759
test('setCQId - should set to fixed value if deterministicCQId is true and table has non _cq_id PKs', (t): void => {
@@ -78,6 +80,7 @@ test('setCQId - should set to fixed value if deterministicCQId is true and table
7880

7981
setCQId(resource, true);
8082

81-
t.is(resource.getColumnData(cqIDColumn.name).valid, true);
82-
t.is(resource.getColumnData(cqIDColumn.name).value.toString(), '415bd5dd-9bac-5806-b9d1-c53f17d37455');
83+
const cqId = resource.getColumnData(cqIDColumn.name);
84+
t.is(cqId.valid, true);
85+
t.is(cqId.toString(), '415bd5dd-9bac-5806-b9d1-c53f17d37455');
8386
});

src/schema/meta.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ test('parentCqUUIDResolver - should set to _cq_id column value when parent has i
9595

9696
parentCqUUIDResolver()({ id: () => '' }, childResource, cqParentIDColumn);
9797

98-
t.is(childResource.getColumnData(cqParentIDColumn.name).value, '9241a9cb-f580-420f-8fd7-46d2c4f55ccb');
99-
t.is(childResource.getColumnData(cqParentIDColumn.name).valid, true);
98+
const cqParentId = childResource.getColumnData(cqParentIDColumn.name);
99+
t.is(cqParentId.valid, true);
100+
t.is(cqParentId.toString(), '9241a9cb-f580-420f-8fd7-46d2c4f55ccb');
100101
});

0 commit comments

Comments
 (0)