File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { Action } from 'redux';
2
2
import type { SagaIterator } from 'redux-saga' ;
3
3
import { put , take } from 'redux-saga/effects' ;
4
4
import { notifyStoriesEvaluated } from 'src/features/stories/StoriesActions' ;
5
- import { NOTIFY_STORIES_EVALUATED } from 'src/features/stories/StoriesTypes' ;
6
5
7
6
import * as actions from '../sideContent/SideContentActions' ;
8
7
import {
@@ -52,7 +51,7 @@ export default function* SideContentSaga(): SagaIterator {
52
51
) ;
53
52
54
53
yield takeEvery (
55
- NOTIFY_STORIES_EVALUATED ,
54
+ notifyStoriesEvaluated . type ,
56
55
function * ( action : ReturnType < typeof notifyStoriesEvaluated > ) {
57
56
yield put ( actions . spawnSideContent ( `stories.${ action . payload . env } ` , action . payload ) ) ;
58
57
}
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import * as Sourceror from 'sourceror';
11
11
import { makeCCompilerConfig , specialCReturnObject } from 'src/commons/utils/CToWasmHelper' ;
12
12
import { javaRun } from 'src/commons/utils/JavaHelper' ;
13
13
import { notifyStoriesEvaluated } from 'src/features/stories/StoriesActions' ;
14
- import { EVAL_STORY } from 'src/features/stories/StoriesTypes' ;
15
14
16
15
import { EventType } from '../../../../features/achievement/AchievementTypes' ;
17
16
import { isSchemeLanguage , OverallState } from '../../../application/ApplicationTypes' ;
@@ -48,7 +47,7 @@ export function* evalCode(
48
47
) : SagaIterator {
49
48
context . runtime . debuggerOn =
50
49
( actionType === EVAL_EDITOR || actionType === DEBUG_RESUME ) && context . chapter > 2 ;
51
- const isStoriesBlock = actionType === EVAL_STORY || workspaceLocation === 'stories' ;
50
+ const isStoriesBlock = actionType === actions . evalStory . type || workspaceLocation === 'stories' ;
52
51
53
52
// Logic for execution of substitution model visualizer
54
53
const correctWorkspace = workspaceLocation === 'playground' || workspaceLocation === 'sicp' ;
Original file line number Diff line number Diff line change @@ -47,3 +47,19 @@ export function deepFilter<T>(
47
47
helper ( nestedObject ) ;
48
48
return matches ;
49
49
}
50
+
51
+ // TODO: Fix type inference for this function,
52
+ // then use it in tests. We no longer need to
53
+ // check the action type as everything gets migrated
54
+ // to RTK and explicit action types are no longer needed.
55
+ // /**
56
+ // * The `expectActionPayload` function is used to test the payload
57
+ // * of an action.
58
+ // * @param action The action to test
59
+ // */
60
+ // export function expectActionPayload<Action extends ActionCreatorWithPreparedPayload<any, any>>(
61
+ // action: ReturnType<Action>
62
+ // ) {
63
+ // const payload: ReturnType<Action>['payload'] = action.payload;
64
+ // return expect(payload);
65
+ // }
You can’t perform that action at this time.
0 commit comments