@@ -1471,18 +1471,6 @@ describe('BaseClient', () => {
14711471 global . __SENTRY__ = { } ;
14721472 } ) ;
14731473
1474- test ( 'sets up each integration on `setupIntegrations` call' , ( ) => {
1475- expect . assertions ( 2 ) ;
1476-
1477- const options = getDefaultTestClientOptions ( { dsn : PUBLIC_DSN , integrations : [ new TestIntegration ( ) ] } ) ;
1478- const client = new TestClient ( options ) ;
1479- // eslint-disable-next-line deprecation/deprecation
1480- client . setupIntegrations ( ) ;
1481-
1482- expect ( Object . keys ( ( client as any ) . _integrations ) . length ) . toEqual ( 1 ) ;
1483- expect ( client . getIntegrationByName ( TestIntegration . id ) ) . toBeTruthy ( ) ;
1484- } ) ;
1485-
14861474 test ( 'sets up each integration on `init` call' , ( ) => {
14871475 expect . assertions ( 2 ) ;
14881476
@@ -1494,18 +1482,6 @@ describe('BaseClient', () => {
14941482 expect ( client . getIntegrationByName ( TestIntegration . id ) ) . toBeTruthy ( ) ;
14951483 } ) ;
14961484
1497- test ( 'skips installation for `setupIntegrations()` if DSN is not provided' , ( ) => {
1498- expect . assertions ( 2 ) ;
1499-
1500- const options = getDefaultTestClientOptions ( { integrations : [ new TestIntegration ( ) ] } ) ;
1501- const client = new TestClient ( options ) ;
1502- // eslint-disable-next-line deprecation/deprecation
1503- client . setupIntegrations ( ) ;
1504-
1505- expect ( Object . keys ( ( client as any ) . _integrations ) . length ) . toEqual ( 0 ) ;
1506- expect ( client . getIntegrationByName ( TestIntegration . id ) ) . toBeFalsy ( ) ;
1507- } ) ;
1508-
15091485 test ( 'skips installation for `init()` if DSN is not provided' , ( ) => {
15101486 expect . assertions ( 2 ) ;
15111487
@@ -1517,22 +1493,6 @@ describe('BaseClient', () => {
15171493 expect ( client . getIntegrationByName ( TestIntegration . id ) ) . toBeFalsy ( ) ;
15181494 } ) ;
15191495
1520- test ( 'skips installation for `setupIntegrations()` if `enabled` is set to `false`' , ( ) => {
1521- expect . assertions ( 2 ) ;
1522-
1523- const options = getDefaultTestClientOptions ( {
1524- dsn : PUBLIC_DSN ,
1525- enabled : false ,
1526- integrations : [ new TestIntegration ( ) ] ,
1527- } ) ;
1528- const client = new TestClient ( options ) ;
1529- // eslint-disable-next-line deprecation/deprecation
1530- client . setupIntegrations ( ) ;
1531-
1532- expect ( Object . keys ( ( client as any ) . _integrations ) . length ) . toEqual ( 0 ) ;
1533- expect ( client . getIntegrationByName ( TestIntegration . id ) ) . toBeFalsy ( ) ;
1534- } ) ;
1535-
15361496 test ( 'skips installation for `init()` if `enabled` is set to `false`' , ( ) => {
15371497 expect . assertions ( 2 ) ;
15381498
@@ -1548,29 +1508,6 @@ describe('BaseClient', () => {
15481508 expect ( client . getIntegrationByName ( TestIntegration . id ) ) . toBeFalsy ( ) ;
15491509 } ) ;
15501510
1551- test ( 'skips installation if integrations are already installed' , ( ) => {
1552- expect . assertions ( 4 ) ;
1553-
1554- const options = getDefaultTestClientOptions ( { dsn : PUBLIC_DSN , integrations : [ new TestIntegration ( ) ] } ) ;
1555- const client = new TestClient ( options ) ;
1556- // note: not the `Client` method `setupIntegrations`, but the free-standing function which that method calls
1557- const setupIntegrationsHelper = jest . spyOn ( integrationModule , 'setupIntegrations' ) ;
1558-
1559- // it should install the first time, because integrations aren't yet installed...
1560- // eslint-disable-next-line deprecation/deprecation
1561- client . setupIntegrations ( ) ;
1562-
1563- expect ( Object . keys ( ( client as any ) . _integrations ) . length ) . toEqual ( 1 ) ;
1564- expect ( client . getIntegrationByName ( TestIntegration . id ) ) . toBeTruthy ( ) ;
1565- expect ( setupIntegrationsHelper ) . toHaveBeenCalledTimes ( 1 ) ;
1566-
1567- // ...but it shouldn't try to install a second time
1568- // eslint-disable-next-line deprecation/deprecation
1569- client . setupIntegrations ( ) ;
1570-
1571- expect ( setupIntegrationsHelper ) . toHaveBeenCalledTimes ( 1 ) ;
1572- } ) ;
1573-
15741511 test ( 'does not add integrations twice when calling `init` multiple times' , ( ) => {
15751512 const options = getDefaultTestClientOptions ( { dsn : PUBLIC_DSN , integrations : [ new TestIntegration ( ) ] } ) ;
15761513 const client = new TestClient ( options ) ;
0 commit comments