mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 00:19:55 +03:00
Change
This commit is contained in:
parent
ea49d0e97f
commit
9479802d65
|
@ -6,7 +6,6 @@ import bodyParser from 'body-parser';
|
|||
import cors from 'cors';
|
||||
import { SCServer } from 'socketcluster-server';
|
||||
import { ApolloServer } from 'apollo-server-express';
|
||||
import graphqlMiddleware from './middleware/graphql';
|
||||
import { AddData, ReportBaseFields, Store } from './store';
|
||||
import { resolvers, schema } from './api/schema';
|
||||
|
||||
|
@ -49,11 +48,16 @@ function routes(
|
|||
store: store,
|
||||
},
|
||||
});
|
||||
await server.start();
|
||||
server.applyMiddleware({ app });
|
||||
graphqlMiddleware(store).applyMiddleware({ app } as {
|
||||
server
|
||||
.start()
|
||||
.then(() => {
|
||||
server.applyMiddleware({ app } as {
|
||||
app: express.Application;
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error); // eslint-disable-line no-console
|
||||
});
|
||||
|
||||
serveUmdModule('react');
|
||||
serveUmdModule('react-dom');
|
||||
|
|
|
@ -2,11 +2,13 @@ import childProcess from 'child_process';
|
|||
import request from 'supertest';
|
||||
import scClient from 'socketcluster-client';
|
||||
|
||||
jest.setTimeout(10000);
|
||||
|
||||
describe('Server', function () {
|
||||
let scServer: childProcess.ChildProcess;
|
||||
beforeAll(async function () {
|
||||
scServer = childProcess.fork(__dirname + '/../bin/redux-devtools.js');
|
||||
await new Promise((resolve) => setTimeout(resolve, 4000));
|
||||
await new Promise((resolve) => setTimeout(resolve, 5000));
|
||||
});
|
||||
|
||||
afterAll(function () {
|
||||
|
|
Loading…
Reference in New Issue
Block a user