Created
January 7, 2019 14:00
-
-
Save seogi1004/90a98f46f0efb4251ced264fe30916ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { shallow } from 'vue-test-utils' | |
import DetailMarketComp from '@/detailMarket' | |
import { data } from '../samples.js' | |
describe('detailMarket.vue', () => { | |
let cmp ; | |
beforeEach(() => { | |
cmp = shallow(DetailMarketComp, { | |
propsData: { | |
title: 'Min Market Cap', | |
data: data[2] | |
} | |
}); | |
}); | |
it('snapshot', () => { | |
cmp.vm.$nextTick(() => { | |
expect(cmp.vm.$el).toMatchSnapshot(); | |
}); | |
}); | |
it('computed', () => { | |
expect(cmp.vm.maxYear).toEqual('2017'); | |
expect(cmp.vm.minYear).toEqual('2015'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment