UNPKG

@sentry/wizard

Version:

Sentry wizard helping you to configure your project

35 lines (33 loc) 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const sdk_setup_1 = require("../../src/remix/sdk-setup"); describe('generateServerInstrumentationFile', () => { it('should generate server instrumentation file', () => { const result = (0, sdk_setup_1.generateServerInstrumentationFile)('https://sentry.io/123', { performance: true, replay: true, }); expect(result.instrumentationFileMod.generate().code) .toMatchInlineSnapshot(` "import * as Sentry from "@sentry/remix"; Sentry.init({ dsn: "https://sentry.io/123", tracesSampleRate: 1 })" `); }); it('should generate server instrumentation file when performance is disabled', () => { const result = (0, sdk_setup_1.generateServerInstrumentationFile)('https://sentry.io/123', { performance: false, replay: true, }); expect(result.instrumentationFileMod.generate().code) .toMatchInlineSnapshot(` "import * as Sentry from "@sentry/remix"; Sentry.init({ dsn: "https://sentry.io/123" })" `); }); }); //# sourceMappingURL=server-instrumentation.test.js.map