Skip to content

Commit 2d6e401

Browse files
authored
test: Add additional integration tests (#914)
1 parent 17d28fc commit 2d6e401

142 files changed

Lines changed: 2206 additions & 57 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import type { SentryRollupPluginOptions } from "@sentry/rollup-plugin";
2+
export declare function getSentryConfig(outDir: string): SentryRollupPluginOptions;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Config that uses a Promise for filesToDeleteAfterUpload
2+
// This tests that the plugin can handle async file deletion patterns
3+
export function getSentryConfig(outDir) {
4+
const fileDeletionPromise = new Promise((resolve) => {
5+
setTimeout(() => {
6+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
7+
resolve([`${outDir}/basic.js.map`]);
8+
}, 100);
9+
});
10+
11+
return {
12+
telemetry: false,
13+
sourcemaps: {
14+
filesToDeleteAfterUpload: fileDeletionPromise,
15+
},
16+
};
17+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
exports.sentryConfig = {
2+
telemetry: false,
3+
authToken: "fake-auth",
4+
org: "fake-org",
5+
project: "fake-project",
6+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import type { SentryRollupPluginOptions } from "@sentry/rollup-plugin";
2+
export declare const sentryConfig: SentryRollupPluginOptions;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const sentryConfig = {
2+
telemetry: false,
3+
release: { name: "I am release!", create: false },
4+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import type { SentryRollupPluginOptions } from "@sentry/rollup-plugin";
2+
export declare function getErrorHandlingConfig(port: string): SentryRollupPluginOptions;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export function getErrorHandlingConfig(port) {
2+
return {
3+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
4+
url: `http://localhost:${port}`,
5+
authToken: "fake-auth",
6+
org: "fake-org",
7+
project: "fake-project",
8+
release: {
9+
name: "1.0.0",
10+
},
11+
debug: true,
12+
};
13+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import type { SentryRollupPluginOptions } from "@sentry/rollup-plugin";
2+
export declare const sentryConfig: SentryRollupPluginOptions;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export const sentryConfig = {
2+
telemetry: false,
3+
release: {
4+
name: 'i am a dangerous release value because I contain a "',
5+
},
6+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import type { SentryRollupPluginOptions } from "@sentry/rollup-plugin";
2+
export declare const sentryConfig: SentryRollupPluginOptions;

0 commit comments

Comments
 (0)