🌗 Sépare les configurations tsconfig
parent
cff7a4da8f
commit
969fb01d87
|
@ -59,7 +59,7 @@ module.exports = {
|
|||
"jsx": true
|
||||
},
|
||||
"tsconfigRootDir": __dirname,
|
||||
"project": [ "./tsconfig.json" ]
|
||||
"project": [ "./mon-entreprise/tsconfig.json", "./publicodes/tsconfig.json" ]
|
||||
},
|
||||
plugins: [ "@typescript-eslint" ],
|
||||
rules: {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"noEmit": true,
|
||||
"strict": true
|
||||
},
|
||||
"include": ["build.js"]
|
||||
},
|
||||
"include": ["build.js"]
|
||||
}
|
||||
|
|
|
@ -1,23 +1,21 @@
|
|||
import { expect } from 'chai'
|
||||
import * as sinon from 'sinon'
|
||||
import { createStore } from 'redux'
|
||||
import { createMemoryHistory } from 'history'
|
||||
|
||||
import { DottedName } from 'modele-social'
|
||||
import { createStore } from 'redux'
|
||||
import * as sinon from 'sinon'
|
||||
import {
|
||||
loadPreviousSimulation,
|
||||
setSimulationConfig,
|
||||
updateSituation,
|
||||
} from '../source/actions/actions'
|
||||
import reducers, {
|
||||
Simulation,
|
||||
SimulationConfig,
|
||||
} from '../source/reducers/rootReducer'
|
||||
import { PreviousSimulation } from '../source/selectors/previousSimulationSelectors'
|
||||
import safeLocalStorage from '../source/storage/safeLocalStorage'
|
||||
import { setupSimulationPersistence } from '../source/storage/persistSimulation'
|
||||
import {
|
||||
loadPreviousSimulation,
|
||||
updateSituation,
|
||||
setSimulationConfig,
|
||||
} from '../source/actions/actions'
|
||||
import safeLocalStorage from '../source/storage/safeLocalStorage'
|
||||
|
||||
function delay(ms) {
|
||||
function delay(ms: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms))
|
||||
}
|
||||
|
||||
|
@ -40,15 +38,15 @@ const initialSimulation: Simulation = {
|
|||
|
||||
describe('[persistence] When simulation persistence is setup', () => {
|
||||
const sandbox = sinon.createSandbox()
|
||||
let spiedSafeLocalStorage
|
||||
let store
|
||||
let spiedSafeLocalStorage: any
|
||||
let store: any
|
||||
|
||||
beforeEach(() => {
|
||||
spiedSafeLocalStorage = sandbox.spy(safeLocalStorage as any)
|
||||
store = createStore(reducers, {
|
||||
simulation: initialSimulation,
|
||||
activeTargetInput: 'sometargetinput',
|
||||
})
|
||||
} as any)
|
||||
|
||||
setupSimulationPersistence(store, 0)
|
||||
})
|
||||
|
@ -81,7 +79,7 @@ describe('[persistence] When simulation config is set', () => {
|
|||
'{"situation":{"dotted name . other":"42"},"activeTargetInput":"someothertargetinput","foldedSteps":["someotherstep"]}'
|
||||
|
||||
const sandbox = sinon.createSandbox()
|
||||
let store
|
||||
let store: any
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "source",
|
||||
"moduleResolution": "node",
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
"esModuleInterop": true,
|
||||
"jsx": "react-jsx",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"allowJs": true,
|
||||
"paths": {
|
||||
"Actions/*": ["actions/*"],
|
||||
"Components": ["components"],
|
||||
|
@ -14,5 +22,5 @@
|
|||
"noEmit": true,
|
||||
"strict": true
|
||||
},
|
||||
"include": ["types", "source", "dev-server.js"]
|
||||
"include": ["types", "source", "test/persistence.test.ts", "dev-server.js"]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/types",
|
||||
"declaration": true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS",
|
||||
"target": "es2015",
|
||||
|
|
Loading…
Reference in New Issue