fix(runtime): close measured portability defects

This commit is contained in:
Tianyi Cui
2026-07-29 20:20:51 +08:00
parent 124fc6a611
commit 674d23118b
6 changed files with 73 additions and 26 deletions
+3 -1
View File
@@ -158,7 +158,9 @@ describe('readHostSource', () => {
it('rejects an oversized source', async () => {
await writeFile(join(ws, 'big.ts'), 'x'.repeat(100))
await expect(readSource('big.ts', 10)).rejects.toThrow(/10-byte limit/)
await expect(readSource('big.ts', 10)).rejects.toMatchObject({
message: 'source "big.ts" exceeds the 10-byte limit',
})
})
it('counts the complete UTF-8 byte length at the configured boundary', async () => {