-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
2,672 additions
and
1,281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
], | ||
"env": { | ||
"test": { | ||
"plugins": [["@babel/transform-runtime"]], | ||
"presets": [["@babel/preset-env", { "targets": { "node": "current" } }]] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import config from './jest.config.mjs'; | ||
|
||
const coverageConfig = { | ||
...config, | ||
collectCoverage: true, | ||
collectCoverageFrom: [ | ||
'./src/**/*', | ||
'!./src/types/*', | ||
'!./src/**/types.ts', | ||
'!./src/**/index.ts', | ||
'!./src/**/*.tspec.ts', | ||
], | ||
coverageThreshold: { | ||
global: { statements: 95, branches: 95 }, | ||
}, | ||
}; | ||
|
||
export default coverageConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const config = { | ||
testEnvironment: 'node', | ||
transform: { | ||
'\\.([jt]sx?)$': ['babel-jest'], | ||
}, | ||
collectCoverage: false, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import untypedTest from 'ava'; | ||
import { defaultErrorSubject } from './defaultErrorSubject'; | ||
import { stubRethrowErrorGlobally } from './testing/utils'; | ||
|
||
const test = stubRethrowErrorGlobally(untypedTest); | ||
beforeAll(() => { | ||
jest.useFakeTimers(); | ||
}); | ||
|
||
test('defaultErrorSubject rethrows errors globally', (t) => { | ||
test('defaultErrorSubject rethrows errors globally', () => { | ||
const error = new Error('Hello errors'); | ||
defaultErrorSubject.next(error); | ||
|
||
t.context.rethrowErrorGlobally.calledOnceWithExactly(error); | ||
t.pass(); | ||
expect(jest.runAllTimers).toThrow(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
export { | ||
RoutineFunc, | ||
VoidPayload, | ||
UnknownAction, | ||
ActionCreatorCommon, | ||
UnknownActionCreator, | ||
UnknownActionCreatorWithPayload, | ||
} from './types'; | ||
export { RoutineFunc } from './routineFunc'; | ||
export { coldMergeOperators } from '../operators/mergeOperators'; | ||
export { defaultErrorSubject } from './defaultErrorSubject'; | ||
export { rethrowErrorGlobally } from './rethrowErrorGlobally'; |
Oops, something went wrong.