Skip to content

Instantly share code, notes, and snippets.

View taylor-lindores-reeves's full-sized avatar
🎯
Focusing

Taylor Lindores Reeves taylor-lindores-reeves

🎯
Focusing
  • Digital Speed
  • London
View GitHub Profile
import { DefaultSession } from "@auth/core/types";
declare module "@auth/core" {
interface Session {
user: {
email: string;
subscribed: boolean;
// By default, TypeScript merges new interface properties and overwrite existing ones. In this case, the default session user properties will be overwritten, with the new one defined above. To keep the default session user properties, you need to add them back into the newly declared interface
} & DefaultSession["user"]; // To keep the default types
}
import { ExpressInstrumentation } from "@opentelemetry/instrumentation-express";
import { HttpInstrumentation } from "@opentelemetry/instrumentation-http";
import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base";
import { PrismaInstrumentation } from "@prisma/instrumentation";
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
import { Resource } from "@opentelemetry/resources";
import { JaegerExporter } from "@opentelemetry/exporter-jaeger";
import { Logger } from "@api/services/LoggerService";
import { registerInstrumentations } from "@opentelemetry/instrumentation";
const request = require('supertest');
let server
describe('Test the root path', () => {
beforeEach(function () {
delete require.cache[require.resolve('../server')];
server = require('../server');
});
afterEach((done) => {