• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kiva / ui / 19147367510

06 Nov 2025 07:26PM UTC coverage: 91.443% (+41.5%) from 49.902%
19147367510

push

github

emuvente
test: refactor category-row-arrows-visible-mixin test with runner method

3722 of 3979 branches covered (93.54%)

Branch coverage included in aggregate %.

18923 of 20785 relevant lines covered (91.04%)

78.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main.js
1
import { createSSRApp } from 'vue';
×
2
import { VueHeadMixin, createHead } from '@unhead/vue';
×
3
import VueProgressBar from '@aacassandra/vue3-progressbar';
×
4
import Vue3TouchEvents from 'vue3-touch-events';
×
5

6
import App from '#src/App';
×
7
import createApolloClient from '#src/api/apollo';
×
8
import kivaPlugins from '#src/plugins';
×
9
import kvAnalytics from '#src/plugins/kv-analytics-plugin';
×
10

11
// App Instance Factory
×
12
// - Allows us to create new instance of app, store + router on each render
×
13
export default async function createApp({
×
14
        apollo = {},
×
15
        appConfig = {},
×
16
        cookieStore,
×
17
        device,
×
18
        kvAuth0,
×
19
        locale,
×
20
        fetch,
×
21
        kivaUserAgent,
×
22
        router,
×
23
        cdnNotedLoggedIn = false,
×
24
        isServer = false,
×
25
        forceHeader = false,
×
26
} = {}) {
×
27
        const renderConfig = {
×
28
                cdnNotedLoggedIn,
×
29
        };
×
30

31
        // Create a new app instance
×
32
        const app = createSSRApp(App);
×
33

34
        // Install router
×
35
        app.use(router);
×
36

37
        if (!isServer) {
×
38
                // Wait for the router to be ready before reading the current route
×
39
                await router.isReady();
×
40
        }
×
41

42
        const route = router.currentRoute.value;
×
43

44
        // Determine if the route should use CDN caching
×
45
        const useCDNCaching = route.meta?.useCDNCaching;
×
46
        renderConfig.useCDNCaching = useCDNCaching;
×
47

48
        const head = createHead();
×
49
        // head for composition api
×
50
        app.use(head);
×
51
        // head for options api
×
52
        app.mixin(VueHeadMixin);
×
53

54
        app.use(kivaPlugins);
×
55
        app.use(kvAnalytics);
×
56
        app.use(Vue3TouchEvents);
×
57
        // Vue progress bar exports an object with a 'default' property on the server
×
58
        app.use(VueProgressBar.default ?? VueProgressBar, {
×
59
                color: '#26b6e8',
×
60
                failedColor: '#9c021a',
×
61
                thickness: '0.2rem',
×
62
                transition: {
×
63
                        speed: '0.2s',
×
64
                        opacity: '0s',
×
65
                        termination: 300,
×
66
                },
×
67
                autoFinish: false,
×
68
        });
×
69

70
        const apolloClient = createApolloClient({
×
71
                ...apollo,
×
72
                appConfig,
×
73
                cookieStore: useCDNCaching && isServer ? null : cookieStore,
×
74
                kvAuth0: useCDNCaching && isServer ? null : kvAuth0,
×
75
                fetch,
×
76
                userAgent: kivaUserAgent,
×
77
                route,
×
78
                forceHeader
×
79
        });
×
80

81
        if (!useCDNCaching || !isServer) {
×
82
                app.provide('cookieStore', cookieStore);
×
83
                app.provide('device', device);
×
84
                app.provide('kvAuth0', kvAuth0);
×
85
                app.provide('locale', locale);
×
86
        }
×
87
        app.provide('apollo', apolloClient);
×
88
        app.provide('$kvTrackEvent', app.config.globalProperties.$kvTrackEvent); // provide kvTrackEvent for composition api
×
89
        app.provide('$appConfig', appConfig); // provide appConfig for composition api
×
90
        app.provide('$renderConfig', renderConfig); // provide renderConfig for composition api
×
91

92
        app.config.globalProperties.$appConfig = appConfig; // provide application config for options api
×
93
        app.config.globalProperties.$renderConfig = renderConfig; // provide renderConfig for options api
×
94

95
        return {
×
96
                app,
×
97
                head,
×
98
                router,
×
99
                apolloClient,
×
100
                renderConfig,
×
101
        };
×
102
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc