This repository was archived by the owner on Apr 8, 2020. It is now read-only.
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() {
66}
77exports . testRun = testRun ;
88function testResult ( result ) {
9- var actions = store_1 . default . getState ( ) . editorActions ;
9+ var actions = store_1 . default . getState ( ) . taskActions ;
1010 return {
1111 payload : { result : result , actions : actions } ,
1212 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');
33var editor_reducer_1 = require ( './editor-reducer' ) ;
44var store_1 = require ( '../../store' ) ;
55function handleTaskActions ( actions ) {
6+ console . log ( 'actions' , actions ) ;
67 var next = actions . shift ( ) ;
8+ console . log ( 'next' , next ) ;
79 if ( next && next . length ) {
810 next . reduce ( function ( total , curr ) {
11+ console . log ( 'total, curr' , total , curr ) ;
912 return total . then ( function ( ) { return editor_reducer_1 . default ( curr ) ; } ) ;
1013 } , Promise . resolve ( ) ) ;
1114 }
@@ -32,6 +35,7 @@ function taskActionsReducer(taskActions, action) {
3235 return actions ;
3336 case _types_1 . TEST_RESULT :
3437 actions = action . payload . actions || [ ] ;
38+ console . log ( 'TEST_RESULT actions' , actions ) ;
3539 var nextTaskPosition = action . payload . result . taskPosition ;
3640 var times = nextTaskPosition - taskTracker ;
3741 if ( times > 0 ) {
Original file line number Diff line number Diff line change 22var redux_1 = require ( 'redux' ) ;
33var reducers_1 = require ( '../reducers' ) ;
44var createLogger = require ( 'redux-logger' ) ;
5- var devMode = false ;
5+ var devMode = true ;
66var store = null ;
77if ( devMode ) {
88 var logger = createLogger ( ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export function testRun(): Action {
88}
99
1010export function testResult ( result : Test . Result ) : Action {
11- let actions = store . getState ( ) . editorActions ;
11+ let actions = store . getState ( ) . taskActions ;
1212 return {
1313 payload : { result, actions } ,
1414 type : TEST_RESULT ,
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ declare namespace CR {
3131 taskTests : string [ ] ;
3232 taskPosition : number ;
3333 hintPosition : number ;
34- editorActions : string [ ] ;
34+ taskActions : string [ ] ;
3535 alert : Alert ;
3636 tutorial : Tutorial ;
3737 tutorials : Tutorial . Info [ ] ;
You can’t perform that action at this time.
0 commit comments