er('transitionend', function() {
            if (collapse.opened) {
              // Check finalSize after animation is done.
              assert.equal(collapse.style.width, 'auto');
              done();
            } else {
              // Check if size is still 0px.
              assert.equal(collapse.style.width, '0px');
              // Trigger 2nd toggle.
              collapse.opened = true;
              // Size should be immediately set.
              assert.equal(collapse.style.width, collapseWi