@fakehost/signalr v1.0.0-beta.3
@fakehost/signalr
A fake version of the Signalr protocol.
- can be run as a localhost service, or bundled within a web browser.
- used for testing client side ui code deeply against a known (fake) backend
- contract tests to ensure the fake matches the remote
- supports JSON and message pack wire protocols
Best place to look is the at the test fake service
See also
See testing in Playwright for playwright setup.
See testing in cypress for cypress setup.
See bundling fakes in a web application for creating standalone demo apps, or similar e.g storybook.
See running as a local service
## Tests
As @fakehost/signalr is a fake version of a real dotnet signalr service.
There is a real signalr server
signalr-test-dotnet-svc. This is a real dotnet signalr service. We use a typescript client generation toolTypedSignalRto generate a typescript client library for calling this remote service. This generate code is outputted tosignalr-test-client-apiThere is a fake implementation of the hubs from the dotnet service
signalr-test-dotnet-svcin thesignalr-test-fake-svc. This is a nodejs fake implementations of the real dotnet services.Along with the fake implementation in
signalr-test-fake-svcthere are contract tests for each hub. These contract tests run against the fakes (yarn test) and are also run against the real dotnet service (yarn test:contract). This ensures that fake version has the exact same behaviour as the real dotnet service, and as such:
The @fakehost/signalr behaves identically to a real dotnet signalr service
License
@fakehost/signalr is licensed under the MIT License.