Skip to content

Instantly share code, notes, and snippets.

@bmfteixeira
Created October 7, 2017 14:40
Show Gist options
  • Save bmfteixeira/7d47e391a7a497d635a9daba1e767c48 to your computer and use it in GitHub Desktop.
Save bmfteixeira/7d47e391a7a497d635a9daba1e767c48 to your computer and use it in GitHub Desktop.
describe('Computed component', () => {
let props
beforeEach(() => {
props = {
plan: 'pro'
}
})
describe('Computed', () => {
it('themeDiv', done => {
const wrapper = shallow(ComputedComponent, {
propsData: props
})
expect(wrapper.vm.themeDiv).to.equal('blue')
wrapper.setProps({
theme: 'trial'
})
expect(wrapper.vm.themeDiv).to.equal('soft-blue')
wrapper.setProps({
theme: 'standard'
})
expect(wrapper.vm.themeDiv).to.equal('orange')
done()
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment