Skip to content

Commit 873a03d

Browse files
committed
🐛 fix unit testing when trying to evaluate
1 parent dfbffa5 commit 873a03d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

template/app/src/components/LandingPageView/CurrentPage.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,17 @@
1717
You are currently at <code>`\{{ $route.path }}`</code> on the <code>`\{{ $route.name }}`</code> view.
1818
</p>
1919
</template>
20+
21+
<script>
22+
export default {
23+
created () {
24+
// Set $route values that are not preset during unit testing
25+
if (process.env.NODE_ENV === 'testing') {
26+
this.$route = {
27+
name: 'landing-page',
28+
path: '/landing-page'
29+
}
30+
}
31+
}
32+
}
33+
</script>

0 commit comments

Comments
 (0)