File tree Expand file tree Collapse file tree 5 files changed +8
-4
lines changed Expand file tree Collapse file tree 5 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ function testRun() {
6
6
}
7
7
exports . testRun = testRun ;
8
8
function testResult ( result ) {
9
- var actions = store_1 . default . getState ( ) . editorActions ;
9
+ var actions = store_1 . default . getState ( ) . taskActions ;
10
10
return {
11
11
payload : { result : result , actions : actions } ,
12
12
type : _types_1 . TEST_RESULT ,
Original file line number Diff line number Diff line change @@ -3,9 +3,12 @@ var _types_1 = require('../../actions/_types');
3
3
var editor_reducer_1 = require ( './editor-reducer' ) ;
4
4
var store_1 = require ( '../../store' ) ;
5
5
function handleTaskActions ( actions ) {
6
+ console . log ( 'actions' , actions ) ;
6
7
var next = actions . shift ( ) ;
8
+ console . log ( 'next' , next ) ;
7
9
if ( next && next . length ) {
8
10
next . reduce ( function ( total , curr ) {
11
+ console . log ( 'total, curr' , total , curr ) ;
9
12
return total . then ( function ( ) { return editor_reducer_1 . default ( curr ) ; } ) ;
10
13
} , Promise . resolve ( ) ) ;
11
14
}
@@ -32,6 +35,7 @@ function taskActionsReducer(taskActions, action) {
32
35
return actions ;
33
36
case _types_1 . TEST_RESULT :
34
37
actions = action . payload . actions || [ ] ;
38
+ console . log ( 'TEST_RESULT actions' , actions ) ;
35
39
var nextTaskPosition = action . payload . result . taskPosition ;
36
40
var times = nextTaskPosition - taskTracker ;
37
41
if ( times > 0 ) {
Original file line number Diff line number Diff line change 2
2
var redux_1 = require ( 'redux' ) ;
3
3
var reducers_1 = require ( '../reducers' ) ;
4
4
var createLogger = require ( 'redux-logger' ) ;
5
- var devMode = false ;
5
+ var devMode = true ;
6
6
var store = null ;
7
7
if ( devMode ) {
8
8
var logger = createLogger ( ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export function testRun(): Action {
8
8
}
9
9
10
10
export function testResult ( result : Test . Result ) : Action {
11
- let actions = store . getState ( ) . editorActions ;
11
+ let actions = store . getState ( ) . taskActions ;
12
12
return {
13
13
payload : { result, actions } ,
14
14
type : TEST_RESULT ,
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ declare namespace CR {
31
31
taskTests : string [ ] ;
32
32
taskPosition : number ;
33
33
hintPosition : number ;
34
- editorActions : string [ ] ;
34
+ taskActions : string [ ] ;
35
35
alert : Alert ;
36
36
tutorial : Tutorial ;
37
37
tutorials : Tutorial . Info [ ] ;
You can’t perform that action at this time.
0 commit comments