File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
4040export function _rollupPluginInternal ( userOptions : Options = { } , buildTool : string ) {
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments