mirror of
https://github.com/aleleba/create-react-ssr.git
synced 2025-01-09 05:26:58 -06:00
Passing Test, routes and config to ts and tsx format.
This commit is contained in:
parent
5fb382832d
commit
1c5117f6d4
@ -3,4 +3,4 @@ const config = {
|
||||
port: process.env.PORT ? process.env.PORT : 80,
|
||||
};
|
||||
|
||||
module.exports = { config: config };
|
||||
export default config;
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@aleleba/create-react-ssr",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.3",
|
||||
"description": "Starter Kit of server side render of react",
|
||||
"bin": "./bin/cli.js",
|
||||
"main": "src/server/index",
|
||||
|
@ -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';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user