Skip to content

Commit 0ab8602

Browse files
committed
More fixes
1 parent 2c77a7d commit 0ab8602

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

packages/rollup-plugin/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function hasExistingDebugID(code: string): boolean {
3434
}
3535

3636
/**
37-
* @ignore - this is the internal plugin factory function
37+
* @ignore - this is the internal plugin factory function only used for the Vite plugin!
3838
*/
3939
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
4040
export function _rollupPluginInternal(userOptions: Options = {}, buildTool: string) {

packages/rollup-plugin/test/public-api.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ describe("sentryRollupPlugin", () => {
1111
jest.clearAllMocks();
1212
});
1313

14-
it("returns a single rollup plugin", () => {
15-
const [plugin] = sentryRollupPlugin({
14+
it("returns an array of rollup plugins (although only one)", () => {
15+
const plugins = sentryRollupPlugin({
1616
authToken: "test-token",
1717
org: "test-org",
1818
project: "test-project",
19-
});
19+
}) as Plugin[];
2020

21-
expect(Array.isArray(plugin)).not.toBe(true);
21+
expect(Array.isArray(plugins)).toBe(true);
22+
expect(plugins).toHaveLength(1);
2223

23-
expect(plugin?.name).toBe("sentry-rollup-plugin");
24+
expect(plugins[0]?.name).toBe("sentry-rollup-plugin");
2425
});
2526
});
2627

0 commit comments

Comments
 (0)