diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-10-16 16:33:08 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-16 09:33:08 +0200 |
commit | d5b767c3747b9e7f9afcbcecffb662843ca2a346 (patch) | |
tree | bb88336c5bdce5b09358eefc310f9b098e81bfde /spec/javascript/components/avatar.test.js | |
parent | 93b54b8d4b51f87c6e9cf642d5f57f557e9cd555 (diff) |
Replace JavaScript Testing Framework from Mocha to Jest (#5412)
Diffstat (limited to 'spec/javascript/components/avatar.test.js')
-rw-r--r-- | spec/javascript/components/avatar.test.js | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/spec/javascript/components/avatar.test.js b/spec/javascript/components/avatar.test.js deleted file mode 100644 index 34949f2b5..000000000 --- a/spec/javascript/components/avatar.test.js +++ /dev/null @@ -1,44 +0,0 @@ -import React from 'react'; -import Avatar from '../../../app/javascript/mastodon/components/avatar'; - -import { expect } from 'chai'; -import { render } from 'enzyme'; -import { fromJS } from 'immutable'; - -describe('<Avatar />', () => { - const account = fromJS({ - username: 'alice', - acct: 'alice', - display_name: 'Alice', - avatar: '/animated/alice.gif', - avatar_static: '/static/alice.jpg', - }); - - const size = 100; - const animated = render(<Avatar account={account} animate size={size} />); - const still = render(<Avatar account={account} size={size} />); - - // Autoplay - xit('renders a div element with the given src as background', () => { - expect(animated.find('div')).to.have.style('background-image', `url(${account.get('avatar')})`); - }); - - xit('renders a div element of the given size', () => { - ['width', 'height'].map((attr) => { - expect(animated.find('div')).to.have.style(attr, `${size}px`); - }); - }); - - // Still - xit('renders a div element with the given static src as background if not autoplay', () => { - expect(still.find('div')).to.have.style('background-image', `url(${account.get('avatar_static')})`); - }); - - xit('renders a div element of the given size if not autoplay', () => { - ['width', 'height'].map((attr) => { - expect(still.find('div')).to.have.style(attr, `${size}px`); - }); - }); - - // TODO add autoplay test if possible -}); |