-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathpublic-api.test.ts
36 lines (30 loc) · 984 Bytes
/
public-api.test.ts
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
36
import { Plugin } from "rollup";
import { sentryRollupPlugin } from "../src";
test("Rollup plugin should exist", () => {
expect(sentryRollupPlugin).toBeDefined();
expect(typeof sentryRollupPlugin).toBe("function");
});
describe("sentryRollupPlugin", () => {
beforeEach(() => {
jest.clearAllMocks();
});
it("returns an array of rollup plugins", () => {
const plugins = sentryRollupPlugin({
authToken: "test-token",
org: "test-org",
project: "test-project",
}) as Plugin[];
expect(Array.isArray(plugins)).toBe(true);
const pluginNames = plugins.map((plugin) => plugin.name);
expect(pluginNames).toEqual(
expect.arrayContaining([
"sentry-telemetry-plugin",
"sentry-rollup-release-injection-plugin",
"sentry-release-management-plugin",
"sentry-rollup-debug-id-injection-plugin",
"sentry-rollup-debug-id-upload-plugin",
"sentry-file-deletion-plugin",
])
);
});
});