Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGolodetsky committed Oct 24, 2021
1 parent b798a01 commit d8110a9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules
package-lock.json
/*/yarn.lock
yarn.lock
coverage

# local env files
.env.local
Expand Down
5 changes: 3 additions & 2 deletions client/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel'
}
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
collectCoverageFrom: ['<rootDir>/use/*.js']
};
37 changes: 19 additions & 18 deletions client/src/tests/unit/TheFooter.spec.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
// import { shallowMount, createLocalVue } from '@vue/test-utils';
// import Vuetify from 'vuetify';
// import Vue from 'vue';
// import TheFooter from '@/components/TheFooter';
// An exapmle of working component unit-test
import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuetify from 'vuetify';
import Vue from 'vue';
import TheFooter from '@/components/TheFooter';

// Vue.use(Vuetify);
Vue.use(Vuetify);

// const localVue = createLocalVue();
// localVue.use(Vuetify);
const localVue = createLocalVue();
localVue.use(Vuetify);

// describe('Components: TheFooter', () => {
// let wrapper = null;
// beforeEach(() => {
// wrapper = shallowMount(TheFooter, {
// localVue
// });
// });
describe('Components: TheFooter', () => {
let wrapper = null;
beforeEach(() => {
wrapper = shallowMount(TheFooter, {
localVue
});
});

// it('it should render copy footer', () => {
// expect(wrapper.find('[data-test-copy]').text()).toBe('©');
// });
// });
it('it should render copy footer', () => {
expect(wrapper.find('[data-test-copy]').text()).toBe('©');
});
});

0 comments on commit d8110a9

Please sign in to comment.