File tree Expand file tree Collapse file tree 9 files changed +9
-36
lines changed Expand file tree Collapse file tree 9 files changed +9
-36
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,7 @@ exercise.addVerifyProcessor(function (callback) {
38
38
try {
39
39
var io = five . stubs . firmata . singleton
40
40
41
- if ( ! io ) {
42
- // yikes, board was never created
43
- return callback ( null , false )
44
- }
41
+ expect ( io , 'no board instance created' ) . to . exist
45
42
46
43
var led = five . Led . instances [ 0 ]
47
44
Original file line number Diff line number Diff line change @@ -45,10 +45,7 @@ exercise.addVerifyProcessor(function (callback) {
45
45
try {
46
46
var io = five . stubs . firmata . singleton
47
47
48
- if ( ! io ) {
49
- // yikes, board was never created
50
- return callback ( null , false )
51
- }
48
+ expect ( io , 'no board instance created' ) . to . exist
52
49
53
50
// Get the listener that is listening for reads on pin A0
54
51
var analogReadListener = null
Original file line number Diff line number Diff line change @@ -49,10 +49,7 @@ exercise.addVerifyProcessor(function (callback) {
49
49
try {
50
50
var io = five . stubs . firmata . singleton
51
51
52
- if ( ! io ) {
53
- // yikes, board was never created
54
- return callback ( null , false )
55
- }
52
+ expect ( io , 'no board instance created' ) . to . exist
56
53
57
54
var btn = five . Button . instances [ 0 ]
58
55
var led = five . Led . instances [ 0 ]
Original file line number Diff line number Diff line change @@ -39,10 +39,7 @@ exercise.addVerifyProcessor(function (callback) {
39
39
try {
40
40
var io = five . stubs . firmata . singleton
41
41
42
- if ( ! io ) {
43
- // yikes, board was never created
44
- return callback ( null , false )
45
- }
42
+ expect ( io , 'no board instance created' ) . to . exist
46
43
47
44
var piezo = five . Piezo . instances [ 0 ]
48
45
Original file line number Diff line number Diff line change @@ -40,10 +40,7 @@ exercise.addVerifyProcessor(function (callback) {
40
40
try {
41
41
var io = five . stubs . firmata . singleton
42
42
43
- if ( ! io ) {
44
- // yikes, board was never created
45
- return callback ( null , false )
46
- }
43
+ expect ( io , 'no board instance created' ) . to . exist
47
44
48
45
// Get the listener that is listening for reads on pin A0
49
46
var analogReadListener = null
Original file line number Diff line number Diff line change @@ -39,10 +39,7 @@ exercise.addVerifyProcessor(function (callback) {
39
39
try {
40
40
var io = five . stubs . firmata . singleton
41
41
42
- if ( ! io ) {
43
- // yikes, board was never created
44
- return callback ( null , false )
45
- }
42
+ expect ( io , 'no board instance created' ) . to . exist
46
43
47
44
var sensor = five . Sensor . instances [ 0 ]
48
45
var servo = five . Servo . instances [ 0 ]
Original file line number Diff line number Diff line change @@ -38,10 +38,7 @@ exercise.addVerifyProcessor(function (callback) {
38
38
try {
39
39
var io = five . stubs . firmata . singleton
40
40
41
- if ( ! io ) {
42
- // yikes, board was never created
43
- return callback ( null , false )
44
- }
41
+ expect ( io , 'no board instance created' ) . to . exist
45
42
46
43
var board = five . Board . instances [ 0 ]
47
44
var servo = five . Servo . instances [ 0 ]
Original file line number Diff line number Diff line change @@ -38,10 +38,7 @@ exercise.addVerifyProcessor(function (callback) {
38
38
try {
39
39
var io = five . stubs . firmata . singleton
40
40
41
- if ( ! io ) {
42
- // yikes, board was never created
43
- return callback ( null , false )
44
- }
41
+ expect ( io , 'no board instance created' ) . to . exist
45
42
46
43
var board = five . Board . instances [ 0 ]
47
44
var motor = five . Motor . instances [ 0 ]
Original file line number Diff line number Diff line change @@ -38,10 +38,7 @@ exercise.addVerifyProcessor(function (callback) {
38
38
try {
39
39
var io = five . stubs . firmata . singleton
40
40
41
- if ( ! io ) {
42
- // yikes, board was never created
43
- return callback ( null , false )
44
- }
41
+ expect ( io , 'no board instance created' ) . to . exist
45
42
46
43
// Get the listener that is listening for reads on pin A0
47
44
var analogReadListener = null
You can’t perform that action at this time.
0 commit comments