Skip to content

Commit

Permalink
Upgrade React to v15.5 (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts committed Apr 10, 2017
1 parent 4ae942d commit 9e1af68
Show file tree
Hide file tree
Showing 8 changed files with 345 additions and 503 deletions.
15 changes: 10 additions & 5 deletions __tests__/components/player.jsx
@@ -1,17 +1,22 @@
import shallow from 'enzyme/shallow';
import React from 'react';
import ReactShallowRenderer from 'react-test-renderer/shallow';
import Player from '../../src/components/player';

const context = {
setVideo() {},
};

test('mount', () => {
const player = shallow(<Player location={{ search: '' }} />, { context });
expect(player.find('div').length).toBe(1);
const renderer = new ReactShallowRenderer();
const result = renderer.render(<Player location={{ search: '' }} />, context);
expect(result.type).toBe('div');
});

test('have search', () => {
const player = shallow(<Player location={{ search: 'https://example.com/index.m3u8' }} />, { context });
expect(player.find('div').length).toBe(1);
const renderer = new ReactShallowRenderer();
const result = renderer.render(
<Player location={{ search: 'https://example.com/index.m3u8' }} />,
context,
);
expect(result.type).toBe('div');
});
11 changes: 5 additions & 6 deletions package.json
Expand Up @@ -34,12 +34,12 @@
"dexie": "^v2.0.0-beta.4",
"hls.js": "^0.7.1",
"http-server": "^0.9.0",
"jss": "^6.3.0",
"jss-theme-reactor": "^0.10.0",
"material-ui": "^1.0.0-alpha.8",
"material-ui": "^1.0.0-alpha.10",
"material-ui-icons": "^1.0.0-alpha.2",
"react": "^15.3.2",
"react-dom": "^15.3.2",
"prop-types": "^15.5.6",
"react": "^15.5.3",
"react-dom": "^15.5.3",
"react-router-dom": "^4.0.0",
"url-search-params": "^0.7.0"
},
Expand All @@ -57,7 +57,6 @@
"babili-webpack-plugin": "^0.0.11",
"copy-webpack-plugin": "^4.0.0",
"coveralls": "^2.11.16",
"enzyme": "^2.5.1",
"eslint": "^3.8.1",
"eslint-config-airbnb": "^14.0.0",
"eslint-plugin-import": "^2.0.1",
Expand All @@ -69,7 +68,7 @@
"jest": "^19.0.2",
"npm-run-all": "^4.0.2",
"preload-webpack-plugin": "^1.2.1",
"react-addons-test-utils": "^15.3.2",
"react-test-renderer": "^15.5.4",
"webpack": "^2.2.0",
"webpack-dev-server": "^2.2.0",
"webpack-merge": "^4.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/components/header.jsx
Expand Up @@ -8,7 +8,8 @@ import TextField from 'material-ui/TextField';
import ToolBar from 'material-ui/Toolbar';
import customPropTypes from 'material-ui/utils/customPropTypes';
import MenuIcon from 'material-ui-icons/Menu';
import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Link } from 'react-router-dom';

const styleSheet = createStyleSheet('Header', () => ({
Expand Down
3 changes: 2 additions & 1 deletion src/components/loader.jsx
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';
import React, { Component } from 'react';

export default class Loader extends Component {
static displayName = 'Loader';
Expand Down
3 changes: 2 additions & 1 deletion src/components/main.jsx
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Route } from 'react-router-dom';
import Loader from './loader';
import Header from './header';
Expand Down
3 changes: 2 additions & 1 deletion src/components/player.jsx
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import URLSearchParams from 'url-search-params';
import Video from './video';

Expand Down
3 changes: 2 additions & 1 deletion src/components/video.jsx
@@ -1,7 +1,8 @@
import Hls from 'hls.js';
import { createStyleSheet } from 'jss-theme-reactor/styleSheet';
import customPropTypes from 'material-ui/utils/customPropTypes';
import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import database from '../databases/media';

const styleSheet = createStyleSheet('Video', () => ({
Expand Down

0 comments on commit 9e1af68

Please sign in to comment.