import { screen, within } from "@testing-library/dom";
import { render } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { Chat } from "./Chat-after-refactoring";
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MessageBus { | |
constructor() { | |
this.listeners = []; | |
} | |
subscribe(listener) { | |
this.listeners.push(listener); | |
} | |
send(message) { | |
this.listeners.forEach(function(listener) { | |
listener.onMessage(message); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
DECODED_SSH_KEY=decoded_key | |
touch $DECODED_SSH_KEY | |
chmod 600 $DECODED_SSH_KEY | |
echo $SSH_KEY | base64 -d > $DECODED_SSH_KEY | |
dbclient-fetcher mysql |