
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
NOTE: Fauxnix is a new project and is likely to change.
Fauxnix is a mock websocket connection for receiving and responding to Phoenix channel messages and is heavily inspired by Pretender.
Fauxnix allows you to create a fake websocket connection and replace the
returned object of new WebSocket()
calls with the socket you passed in.
const socket = new Fauxnix(function() {
this.receive("topic", "event", function(payload) {
return { status: "ok", response: { id: payload.id } };
});
});
Fauxnix.inject(socket);
Whenever socket
receives a message from phoenix.js
with a topic of
"topic"
and an event of "event"
Fauxnix will send a reply with the given
status
and response
in the return statement. The payload
from a message is
passed in as the first argument to this.receive
s callback.
The call to Fauxnix.inject
replaces the returned object of all new WebSocket()
calls with the socket
we defined.
The topic and event arguments also accept regular expressions.
See the CONTRIBUTING document. Thank you, contributors!
Fauxnix is Copyright © 2015 thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.
Fauxnix is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.
We love open source software! See our other projects or hire us to design, develop, and grow your product.
FAQs
A fake websocket connection for Phoenix channels
We found that fauxnix demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.