-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathpublic-api.test.ts
More file actions
35 lines (29 loc) · 919 Bytes
/
public-api.test.ts
File metadata and controls
35 lines (29 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { sentryVitePlugin } from "../src";
test("Vite plugin should exist", () => {
expect(sentryVitePlugin).toBeDefined();
expect(typeof sentryVitePlugin).toBe("function");
});
describe("sentryVitePlugin", () => {
beforeEach(() => {
jest.clearAllMocks();
});
it("returns an array of Vite plugins", () => {
const plugins = sentryVitePlugin({
authToken: "test-token",
org: "test-org",
project: "test-project",
});
expect(Array.isArray(plugins)).toBe(true);
const pluginNames = plugins.map((plugin) => plugin.name);
expect(pluginNames).toEqual(
expect.arrayContaining([
"sentry-telemetry-plugin",
"sentry-vite-release-injection-plugin",
"sentry-release-management-plugin",
"sentry-vite-debug-id-injection-plugin",
"sentry-vite-debug-id-upload-plugin",
"sentry-file-deletion-plugin",
])
);
});
});