Skip to content

Commit 523b638

Browse files
committed
test: add TODO comments to IterableUtil tests for type verification of return values
1 parent 94665c5 commit 523b638

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/classes/IterableUtil.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ describe('IterableUtil', () => {
9898
expect(result).toBe(false);
9999
});
100100

101+
// TODO: Verify that we want this to return a string instead of a boolean
101102
it('should return truthy string as boolean when key exists', () => {
102103
// GIVEN a dictionary with truthy string value
103104
const dict = { testKey: 'true' };
@@ -109,6 +110,7 @@ describe('IterableUtil', () => {
109110
expect(result).toBe('true');
110111
});
111112

113+
// TODO: Verify that we want this to return a number instead of a boolean
112114
it('should return truthy number as boolean when key exists', () => {
113115
// GIVEN a dictionary with truthy number value
114116
const dict = { testKey: 1 };
@@ -120,6 +122,7 @@ describe('IterableUtil', () => {
120122
expect(result).toBe(1);
121123
});
122124

125+
// TODO: Verify that we want this to return an object instead of a boolean
123126
it('should return truthy object as boolean when key exists', () => {
124127
// GIVEN a dictionary with truthy object value
125128
const dict = { testKey: {} };
@@ -131,6 +134,7 @@ describe('IterableUtil', () => {
131134
expect(result).toEqual({});
132135
});
133136

137+
// TODO: Verify that we want this to return an array instead of a boolean
134138
it('should return truthy array as boolean when key exists', () => {
135139
// GIVEN a dictionary with truthy array value
136140
const dict = { testKey: [] };
@@ -142,6 +146,7 @@ describe('IterableUtil', () => {
142146
expect(result).toEqual([]);
143147
});
144148

149+
// TODO: Verify that we want this to return a function instead of a boolean
145150
it('should return truthy function as boolean when key exists', () => {
146151
// GIVEN a dictionary with truthy function value
147152
const dict = { testKey: () => {} };

0 commit comments

Comments
 (0)