diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-06-02 00:27:15 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-06-01 17:27:15 +0200 |
commit | 39ea5c0e2e9bdf2c6e3bd0797e6fb422e6117aa2 (patch) | |
tree | 5af615d8559d8f142d6a979ba944d4f6b0cf49b6 /spec/javascript/components/avatar.test.jsx | |
parent | 509b0cfafc0857538d63f4b93b26462f035d458b (diff) |
Improve tests for JavaScript (#3496)
- Upgrade dependencies - chai (3.5.0 -> 4.0.1) - chai-enzyme (0.6.1 -> 0.7.1) - sinon (2.2.0 -> 2.3.2) - Change extensions from .jsx to .js - Don't assign `React` to `global` - Check code format using ESLint
Diffstat (limited to 'spec/javascript/components/avatar.test.jsx')
-rw-r--r-- | spec/javascript/components/avatar.test.jsx | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/spec/javascript/components/avatar.test.jsx b/spec/javascript/components/avatar.test.jsx deleted file mode 100644 index f70173880..000000000 --- a/spec/javascript/components/avatar.test.jsx +++ /dev/null @@ -1,20 +0,0 @@ -import { expect } from 'chai'; -import { render } from 'enzyme'; - -import Avatar from '../../../app/javascript/mastodon/components/avatar' - -describe('<Avatar />', () => { - const src = '/path/to/image.jpg'; - const size = 100; - const wrapper = render(<Avatar src={src} animate size={size} />); - - it('renders a div element with the given src as background', () => { - expect(wrapper.find('div')).to.have.style('background-image', `url(${src})`); - }); - - it('renders a div element of the given size', () => { - ['width', 'height'].map((attr) => { - expect(wrapper.find('div')).to.have.style(attr, `${size}px`); - }); - }); -}); |