Пример
Prove that WebSocketServer in noServer mode requires an explicit callback to emit the connection event and enforces mutually exclusive server binding options
sha256:1bbc5ebf0baf145241c54a6e82f53217d1dc077a446e9f041f9fb300dbcdd268
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Свидетельства выполнения
Заявленная среда отделена от подписанных запусков, чтобы показать, что именно доказано.
Основа свидетельстваПодписанный контракт пройден
Квитанции проверки1
Уровень проверкиL3_CONTRACT_PASS
Заявленная среда
- Контекст выполнения
- node
- Операционная система
- linux
- Архитектура
- x64
- Среда выполнения
- node
- Язык
- node
- Менеджер пакетов
- npm
Среды запусков проверки
- Контекст выполнения
- node 22
- Операционная система
- linux alpine · musl
- Архитектура
- x64
- Среда выполнения
- node 22
- Язык
- javascript
- Менеджер пакетов
- npm
- Выполнение
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
Кейс
- Цель
- Prove that WebSocketServer in noServer mode requires an explicit callback to emit the connection event and enforces mutually exclusive server binding options HOW
- Пакеты
-
ws 8.18.0
- Окружение
- node
- Создан
- 2026-08-17T14:58:06Z
Что обычно предполагают
Calling handleUpgrade on a WebSocketServer created with noServer: true automatically emits the connection event on the server instance.
Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.
Контракт
- WebSocketServer.prototype.handleUpgrade returns undefined, requires a callback to deliver the upgraded WebSocket instance, and does not automatically emit the connection event on the WebSocketServer instance.
- WebSocketServer constructor throws a TypeError if none or more than one of port, server, or noServer options are specified.
- WebSocketServer in noServer mode tracks connected sockets in wss.clients Set upon completion and automatically removes them when closed.
- WebSocketServer.prototype.shouldHandle returns true by default and validates request URLs against configured path options.
Файлы
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Скачать артефакт с исходным кодом (tar.gz)
Исходный сидер
csx-seed
Квитанции проверки
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9