Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Updated NodeJS (v10), React (v16) and Enzyme (v3). #242

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-addons-test-utils": "^15.4.2",
"react-scripts-ts": "1.0.6"
"@types/enzyme": "^3.1.0",
"@types/jest": "^23.3.10",
"@types/node": "^10.12.12",
"@types/react": "^16.0.16",
"@types/react-dom": "^16.0.2",
"@types/react-redux": "^6.0.10",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.2",
"react-scripts-ts": "^3.1.0",
"react-test-renderer": "^16.0.0",
"typescript": "^3.2.1"
},
"dependencies": {
"@types/enzyme": "^2.7.2",
"@types/jest": "^18.1.1",
"@types/node": "^7.0.5",
"@types/react": "^15.6.6",
"@types/react-dom": "^0.14.22",
"@types/react-redux": "^4.4.36",
"enzyme": "^2.7.1",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-redux": "^5.0.2",
"redux": "^3.6.0"
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-redux": "^6.0.0",
"redux": "^4.0.1"
},
"scripts": {
"start": "react-scripts-ts start",
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Hello.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Hello from '../components/Hello';
import * as actions from '../actions/';
import { StoreState } from '../types/index';
import { connect, Dispatch } from 'react-redux';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';

export function mapStateToProps({ enthusiasmLevel, languageName }: StoreState) {
return {
Expand Down
3 changes: 2 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import * as ReactDOM from 'react-dom';
import Hello from './containers/Hello';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import { EnthusiasmAction } from './actions/index';
import { enthusiasm } from './reducers/index';
import { StoreState } from './types/index';

import './index.css';

const store = createStore<StoreState>(enthusiasm, {
const store = createStore<StoreState, EnthusiasmAction, any, any>(enthusiasm, {
enthusiasmLevel: 1,
languageName: 'TypeScript',
});
Expand Down
4 changes: 4 additions & 0 deletions src/setupTests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { configure } from 'enzyme';
import * as Adapter from 'enzyme-adapter-react-16';

configure({ adapter: new Adapter() });
6 changes: 6 additions & 0 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs"
}
}
Loading