Summary#
런타임이 이미 제공하는 표준 API를 테스트 환경에서 계속 폴리필하면, 객체 브랜드나 타입 정체성이 달라져 조합 API에서 예상치 못한 실패가 날 수 있다. 지원 대상 런타임 버전이 충분히 올라갔다면 폴리필을 제거하고 네이티브 구현을 기준으로 테스트하는 편이 안정적이다.
Problem#
Node.js가 AbortController를 기본 제공하는데도 테스트에서 별도 폴리필을 사용하면서, AbortSignal.any에 전달된 signal이 올바른 AbortSignal 타입으로 인식되지 않아 TypeError가 발생했다.
Solution#
지원하는 최소 Node.js 버전에서 제공되는 Web API는 폴리필을 제거하고 네이티브 객체를 사용한다. 특히 AbortSignal, URL, Blob, EventTarget처럼 브랜드 체크가 있는 API는 서로 다른 구현을 섞지 않도록 테스트 셋업을 단순화한다.
Failure Modes#
- 네이티브 객체와 폴리필 객체를 혼용해 instanceof 또는 내부 브랜드 체크가 실패함
- 오래된 호환성 코드가 남아 최신 런타임의 표준 API 동작을 가림
- 테스트 환경만 실제 실행 환경과 달라 재현하기 어려운 오류가 발생함
- 최소 지원 런타임 버전 변경 후 테스트 셋업을 정리하지 않음
Sources#
- https://github.com/Comfy-Org/ComfyUI/pull/16369
- https://github.com/Comfy-Org/ComfyUI/pull/16333
- https://github.com/Comfy-Org/ComfyUI/pull/16366
- https://github.com/Comfy-Org/ComfyUI/pull/16227
- https://github.com/Comfy-Org/ComfyUI/pull/16250
- https://github.com/Comfy-Org/ComfyUI/pull/16350
- https://github.com/Comfy-Org/ComfyUI/pull/16345
- https://github.com/Comfy-Org/ComfyUI/pull/16347
- https://github.com/Comfy-Org/ComfyUI/pull/16320
- https://github.com/GitHubDaily/GitHubDaily/pull/267
- https://github.com/GitHubDaily/GitHubDaily/pull/52
- https://github.com/react/react/pull/37587
- https://github.com/react/react/pull/37618
- https://github.com/react/react/pull/37633
- https://github.com/react/react/pull/37576
- https://github.com/react/react/pull/37622
- https://github.com/react/react/pull/34759
- https://github.com/react/react/pull/37613
- https://github.com/react/react/pull/37580
- https://github.com/react/react/pull/37608
- https://github.com/thedaviddias/Front-End-Checklist/pull/737
- https://github.com/thedaviddias/Front-End-Checklist/pull/664
- mined_at: 2026-09-17T12:10:42Z
Sagwan Revalidation 2026-09-17T12:45:46Z#
- verdict:
ok - note: 네이티브 Web API와 폴리필 브랜드 혼용 위험은 현재도 유효하다.