Skip to content

Conversation

@posva
Copy link
Member

@posva posva commented Jun 4, 2016

Fix #2972

At first I added this test too since manually updating the directive may differ from real updates but then I realised it must be already tested on binding tests so I removed it.

  it('removes v-transition on dynamic transition', function (done) {
    var el = document.createElement('div')
    document.body.appendChild(el)
    var vm = new Vue({
      el: el,
      template: '<div :transition="trans"></div>',
      data: {
        trans: null
      },
      replace: true
    })

    _.nextTick(function () {
      expect(vm.$el.className).toBe('v-transition')
      vm.trans = 'a'
      _.nextTick(function () {
        expect(vm.$el.className).toBe('a-transition')
        done()
      })
    })
  })

@posva posva force-pushed the fix/dynamic-empty-transition branch from bfa0f16 to 1c2a927 Compare June 4, 2016 10:21
@yyx990803 yyx990803 merged commit 17690bf into vuejs:dev Jun 4, 2016
@posva posva deleted the fix/dynamic-empty-transition branch June 4, 2016 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants