File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
exercises/spin_motor_spin Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ exercise.addVerifyProcessor(function (callback) {
58
58
59
59
// Start was called before stop
60
60
expect ( start0 . calledBefore ( stop0 ) , 'motor was not started before it was stopped!' ) . to . be . true
61
+ expect ( start0 . args [ 0 ] , 'motor not started at 200' ) . to . equal ( 200 )
61
62
expect ( board . wait . callCount , 'board.wait was not called' ) . to . be . gt ( 1 )
62
63
63
64
var wait0 = board . wait . getCall ( 0 )
@@ -69,6 +70,7 @@ exercise.addVerifyProcessor(function (callback) {
69
70
expect ( wait1 . calledAfter ( stop0 ) , 'didn\'t use board.wait after motor stopped' )
70
71
expect ( wait1 . args [ 0 ] , 'didn\'t use board.wait to wait 1 second before starting the motor again' ) . to . equal ( 1000 )
71
72
expect ( start1 . calledAfter ( wait1 ) , 'motor didn\'t start again after 1 second' )
73
+ expect ( start1 . args [ 0 ] , 'motor not started again at 200' ) . to . equal ( 200 )
72
74
73
75
callback ( null , true )
74
76
} catch ( e ) {
Original file line number Diff line number Diff line change 1
1
__ Attach a motor to pin 9 and start it spinning!__
2
2
3
+ * Spin the motor at ** 200** mph
3
4
* Use ` board.wait ` to stop the motor spinning after ** 2 seconds**
4
5
* Start it spinning again after another second
5
6
* Ensure this loop repeats infinitely
You can’t perform that action at this time.
0 commit comments