Skip to content

Commit 141b5dd

Browse files
committed
test(schemas): complete unresolved .resolves assertions in splitByTags test
Three `await expect(readFile(...)).resolves;` chains had no trailing matcher, so the promise was awaited but no assertion ran. The file- exists intent only surfaced via promise rejection. Added `.toBeDefined()` to make the assertion explicit. The broader readFile-vs-pathExists inconsistency is tracked in #3623.
1 parent 560bbfa commit 141b5dd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/api-generation.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,9 +1450,9 @@ test('axios tags-split + schemas.splitByTags separates per-tag schemas from cros
14501450
// Shared schemas referenced by both tags stay at the root, not in any tag
14511451
// subdir. `Pagination` is shared even though it is only reached via
14521452
// `PetList`/`StoreList` — both tag-scoped wrappers reference it.
1453-
await expect(readFile(path.join(root, 'error.ts'), 'utf8')).resolves;
1454-
await expect(readFile(path.join(root, 'sortOrder.ts'), 'utf8')).resolves;
1455-
await expect(readFile(path.join(root, 'pagination.ts'), 'utf8')).resolves;
1453+
await expect(readFile(path.join(root, 'error.ts'), 'utf8')).resolves.toBeDefined();
1454+
await expect(readFile(path.join(root, 'sortOrder.ts'), 'utf8')).resolves.toBeDefined();
1455+
await expect(readFile(path.join(root, 'pagination.ts'), 'utf8')).resolves.toBeDefined();
14561456
// No tag owns a schema named after the other tag.
14571457
await expect(
14581458
readFile(path.join(root, 'pets', 'store.ts'), 'utf8'),

0 commit comments

Comments
 (0)