@@ -1779,12 +1779,72 @@ void main() {
17791779 expect (capturedEnvelope.header.dsn, fixture.options.dsn);
17801780 });
17811781
1782- test ('Spotlight enabled should set transport to SpotlightHttpTransport' ,
1782+ test (
1783+ 'Spotlight enabled should not set transport to SpotlightHttpTransport on iOS' ,
1784+ () async {
1785+ fixture.options.platformChecker = MockPlatformChecker (
1786+ platform: MockPlatform .iOS (),
1787+ );
1788+ fixture.options.spotlight = Spotlight (enabled: true );
1789+ fixture.getSut ();
1790+
1791+ expect (fixture.options.transport is SpotlightHttpTransport , isFalse);
1792+ });
1793+
1794+ test (
1795+ 'Spotlight enabled should not set transport to SpotlightHttpTransport on macOS' ,
1796+ () async {
1797+ fixture.options.platformChecker = MockPlatformChecker (
1798+ platform: MockPlatform .macOS (),
1799+ );
1800+ fixture.options.spotlight = Spotlight (enabled: true );
1801+ fixture.getSut ();
1802+
1803+ expect (fixture.options.transport is SpotlightHttpTransport , isFalse);
1804+ });
1805+
1806+ test (
1807+ 'Spotlight enabled should not set transport to SpotlightHttpTransport on Android' ,
1808+ () async {
1809+ fixture.options.platformChecker = MockPlatformChecker (
1810+ platform: MockPlatform .android (),
1811+ );
1812+ fixture.options.spotlight = Spotlight (enabled: true );
1813+ fixture.getSut ();
1814+
1815+ expect (fixture.options.transport is SpotlightHttpTransport , isFalse);
1816+ });
1817+
1818+ test (
1819+ 'Spotlight enabled should set transport to SpotlightHttpTransport on Web' ,
1820+ () async {
1821+ fixture.options.platformChecker = MockPlatformChecker (isWebValue: true );
1822+ fixture.options.spotlight = Spotlight (enabled: true );
1823+ fixture.getSut ();
1824+
1825+ expect (fixture.options.transport is SpotlightHttpTransport , isTrue);
1826+ });
1827+
1828+ test (
1829+ 'Spotlight enabled should set transport to SpotlightHttpTransport on Linux' ,
1830+ () async {
1831+ fixture.options.platformChecker =
1832+ MockPlatformChecker (platform: MockPlatform .linux ());
1833+ fixture.options.spotlight = Spotlight (enabled: true );
1834+ fixture.getSut ();
1835+
1836+ expect (fixture.options.transport is SpotlightHttpTransport , isTrue);
1837+ });
1838+
1839+ test (
1840+ 'Spotlight enabled should set transport to SpotlightHttpTransport on Windows' ,
17831841 () async {
1842+ fixture.options.platformChecker =
1843+ MockPlatformChecker (platform: MockPlatform .windows ());
17841844 fixture.options.spotlight = Spotlight (enabled: true );
17851845 fixture.getSut ();
17861846
1787- expect (fixture.options.transport is SpotlightHttpTransport , true );
1847+ expect (fixture.options.transport is SpotlightHttpTransport , isTrue );
17881848 });
17891849 });
17901850
0 commit comments