mirror of
https://github.com/aleleba/create-react-ssr.git
synced 2025-07-04 03:38:34 -06:00
Passing Test, routes and config to ts and tsx format.
This commit is contained in:
@ -5,17 +5,17 @@ import App from '../App';
|
||||
|
||||
describe('<App/> Component', () => {
|
||||
beforeEach(() => {
|
||||
fetch.resetMocks();
|
||||
fetchMock.resetMocks();
|
||||
});
|
||||
|
||||
test('Should render root <App /> Component', async () => {
|
||||
fetch.mockResponseOnce(JSON.stringify({
|
||||
fetchMock.mockResponseOnce(JSON.stringify({
|
||||
//First Data Fetch
|
||||
data: 'data'
|
||||
}));
|
||||
|
||||
render(
|
||||
<ProviderMock>
|
||||
<ProviderMock initialState={undefined}>
|
||||
<App />
|
||||
</ProviderMock>
|
||||
)
|
@ -6,7 +6,7 @@ import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import { IInitialState } from './reducers/index';
|
||||
import setStore from './setStore';
|
||||
import { config } from '../../config';
|
||||
import config from '../../config';
|
||||
|
||||
import './styles/global.sass';
|
||||
import App from './components/App';
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { createStore } from 'redux'; //, applyMiddleware
|
||||
// import { Provider } from 'react-redux';
|
||||
import { composeWithDevTools as composeWithDevToolsWeb } from 'redux-devtools-extension';
|
||||
import { config } from '../../config';
|
||||
import config from '../../config';
|
||||
import reducer, { IInitialState } from './reducers';
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//Dependencies of Server
|
||||
import express from 'express';
|
||||
import { config } from '../../config';
|
||||
import config from '../../config';
|
||||
import webpack from 'webpack';
|
||||
import helmet from 'helmet';
|
||||
|
||||
|
Reference in New Issue
Block a user