Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
samouri committed Feb 16, 2022
1 parent 2729c29 commit ac9c39b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/unit/core/dom/test-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,17 @@ describes.sandboxed('DOM - style helpers', {}, (env) => {
});

it('setStyle with vendor prefix', () => {
const element = {style: {WebkitTransitionDuration: ''}};
const element = {
style: {
WebkitTransitionDuration: '',
setProperty: (name, value) => {
element.style[name] = value;
},
},
};

st.setStyle(element, 'transitionDuration', '1s', undefined, true);
expect(element.style.WebkitTransitionDuration).to.equal('1s');
expect(element.style['-webkit-transition-duration']).to.equal('1s');
});

it('setStyle with custom var', () => {
Expand Down Expand Up @@ -97,7 +105,7 @@ describes.sandboxed('DOM - style helpers', {}, (env) => {

it('camelCaseToHyphenCase', () => {
const str = 'paddingTop';
expect(st.camelCaseToTitleCase(str)).to.equal('padding-top');
expect(st.camelCaseToHyphenCase(str)).to.equal('padding-top');
});

it('removeAlphaFromColor', () => {
Expand Down

0 comments on commit ac9c39b

Please sign in to comment.