Skip to content

Commit deee52c

Browse files
committed
fix: tests
1 parent 3cdec69 commit deee52c

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

packages/analytics/e2e/analytics.e2e.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,22 +1138,26 @@ describe('analytics() modular', function () {
11381138

11391139
describe('getGoogleAnalyticsClientId()', function () {
11401140
it('Error when trying to use getGoogleAnalyticsClientId() on non-web platforms', async function () {
1141-
if (Platform.other) {
1141+
if (!Platform.other) {
11421142
try {
11431143
const { getAnalytics } = analyticsModular;
1144-
getGoogleAnalyticsClientId(getAnalytics());
1144+
await getGoogleAnalyticsClientId(getAnalytics());
1145+
fail('Should have thrown an error');
11451146
} catch (e) {
1146-
expect(e.message).to.equal('getGoogleAnalyticsClientId is web-only.');
1147+
e.message.should.equal(
1148+
'getGoogleAnalyticsClientId is web-only.',
1149+
);
11471150
}
11481151
}
11491152
this.skip();
11501153
});
11511154

11521155
it('A response is received from getGoogleAnalyticsClientId() on web platforms', async function () {
11531156
const { getAnalytics } = analyticsModular;
1154-
if (!Platform.other) {
1155-
expect(!!getGoogleAnalyticsClientId(getAnalytics())).to.be(true);
1157+
if (Platform.other) {
1158+
await getGoogleAnalyticsClientId(getAnalytics());
11561159
}
1160+
this.skip();
11571161
});
11581162
});
11591163
});

0 commit comments

Comments
 (0)