Skip to content

[FIX] Unit test coverage. #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Vue_Starter/src/views/Dashboard.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="animated fadeIn">
Hello World
<p class="text-info">Hello World</p>
</div>
</template>

Expand Down
10 changes: 5 additions & 5 deletions Vue_Starter/test/unit/specs/Hello.spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Vue from 'vue'
import Hello from '@/components/Hello'
import Dashboard from '@/views/Dashboard'

describe('Hello.vue', () => {
describe('Dashboard.vue', () => {
it('should render correct contents', () => {
const Constructor = Vue.extend(Hello)
const Constructor = Vue.extend(Dashboard)
const vm = new Constructor().$mount()
expect(vm.$el.querySelector('.hello h1').textContent)
.to.equal('Welcome to Your Vue.js App')
expect(vm.$el.querySelector('.text-info').textContent)
.to.equal('Hello World')
})
})