refactor: Update import statements for jest in test files

This commit updates the import statements for jest in multiple test files. The previous import statements used "globals" as the module name, which is incorrect. The correct module name is "jest". This change ensures that the jest module is imported correctly, improving the accuracy and reliability of the test setup.
This commit is contained in:
Simon Larsen
2024-06-14 15:42:33 +01:00
parent 4c4169e245
commit 3c8c2a3feb
5 changed files with 52 additions and 4 deletions

27
Examples/fluentd/index.ts Normal file
View File

@@ -0,0 +1,27 @@
// This app will log all the logs to the docker-container fluentd that's running in development.
// You can find the details of the docker container in this file: /docker-compose.dev.yml
// This docker container is not run in production because there is no need to, customers will run fluentd on their own side in production.
import express from "express";
const FluentClient = require("@fluent-org/logger").FluentClient;
const app = express();
// The 2nd argument can be omitted. Here is a default value for options.
const logger: FluentClient = new FluentClient("fluentd.test", {
socket: {
host: "localhost",
port: 24224,
timeout: 3000, // 3 seconds
},
});
app.get("/", (request, response) => {
logger.emit("follow", { from: "userA", to: "userB" });
response.send("Hello World!");
});
const port = 7856;
app.listen(port, () => {
console.log("Listening on " + port);
});