We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6542137 + 9e73ecc commit 3dd721aCopy full SHA for 3dd721a
1 file changed
test/features/DeepStrictAssert.ts
@@ -1,3 +1,4 @@
1
+import { ok } from 'assert';
2
import typia, { tags } from 'typia';
3
import { deepStrictAssert } from '../../src';
4
@@ -138,3 +139,14 @@ export function test_functions_deepStrictAssert_accesses_multiple_nested_array_p
138
139
typia.assertEquals(resultD);
140
typia.assertEquals(resultE);
141
}
142
+
143
+/**
144
+ * Tests that deepStrictAssert can access a non-leaf object key without crashing.
145
+ * This verifies the fix for GitHub issue #19.
146
+ */
147
+export function test_functions_deepStrictAssert_accesses_non_leaf_object_key() {
148
+ const data = { user: { name: 'Alice', age: 30 } };
149
+ const result = deepStrictAssert(data)('user');
150
+ ok(result.user.name === 'Alice');
151
+ ok(result.user.age === 30);
152
+}
0 commit comments