We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3eebc6c commit 012973aCopy full SHA for 012973a
src/index.test.ts
@@ -1,3 +1,5 @@
1
+import { createApp } from "vue";
2
+import * as api from "./api/index";
3
import addGtag from "./core/add-gtag";
4
import { createGtag } from "./index";
5
@@ -8,4 +10,13 @@ describe("index", () => {
8
10
createGtag({ tagId: "UA-123456789" });
9
11
expect(addGtag).toHaveBeenCalled();
12
});
13
+
14
+ it("should install global properties", () => {
15
+ const app = createApp({});
16
+ const gtag = createGtag({ tagId: "UA-123456789" });
17
18
+ app.use(gtag);
19
20
+ expect(app.config.globalProperties.$gtag).toEqual(api);
21
+ });
22
0 commit comments