11import chai from 'chai' ;
22import fs from 'fs' ;
33import { GCodeInterpreter } from '../lib/' ;
4- import _ from 'lodash' ;
54
65const expect = chai . expect ;
76const should = chai . should ( ) ;
87
9- describe ( 'G-code Interpreter' , ( done ) => {
10- describe ( 'Pass a null value as the first argument' , ( done ) => {
8+ describe ( 'G-code Interpreter' , ( ) => {
9+ describe ( 'Pass a null value as the first argument' , ( ) => {
1110 class GCodeRunner extends GCodeInterpreter {
1211 constructor ( options ) {
1312 super ( options ) ;
1413 }
1514 }
1615
17- let runner = new GCodeRunner ( ) ;
16+ const runner = new GCodeRunner ( ) ;
1817 it ( 'should call loadFromString\'s callback.' , ( done ) => {
1918 runner . loadFromString ( null , ( err , results ) => {
2019 expect ( err ) . to . be . equal ( null ) ;
@@ -35,7 +34,7 @@ describe('G-code Interpreter', (done) => {
3534 } ) ;
3635 } ) ;
3736
38- describe ( 'Event listeners' , ( done ) => {
37+ describe ( 'Event listeners' , ( ) => {
3938 it ( 'should call event listeners when loading G-code from file.' , ( done ) => {
4039 const file = 'test/fixtures/circle.nc' ;
4140 const runner = new GCodeInterpreter ( ) ;
@@ -91,9 +90,9 @@ describe('G-code Interpreter', (done) => {
9190 } ) ;
9291 } ) ;
9392
94- describe ( 'G-code: circle (calls GCodeInterpreter)' , ( done ) => {
93+ describe ( 'G-code: circle (calls GCodeInterpreter)' , ( ) => {
9594 it ( 'should call each function with the expected number of times.' , ( done ) => {
96- let calls = { } ;
95+ const calls = { } ;
9796
9897 class GCodeRunner {
9998 loadFile ( file , callback ) {
@@ -112,7 +111,7 @@ describe('G-code Interpreter', (done) => {
112111 }
113112 } ;
114113
115- let interpreter = new GCodeInterpreter ( { handlers : handlers } )
114+ const interpreter = new GCodeInterpreter ( { handlers : handlers } )
116115 interpreter . loadFromFile ( file , callback ) ;
117116
118117 return interpreter ;
@@ -130,8 +129,8 @@ describe('G-code Interpreter', (done) => {
130129 } ) ;
131130
132131
133- describe ( 'G-code: circle (extends GCodeInterpreter)' , ( done ) => {
134- let calls = { } ;
132+ describe ( 'G-code: circle (extends GCodeInterpreter)' , ( ) => {
133+ const calls = { } ;
135134
136135 class GCodeRunner extends GCodeInterpreter {
137136 constructor ( options ) {
@@ -152,7 +151,7 @@ describe('G-code Interpreter', (done) => {
152151 }
153152
154153 it ( 'should call each function with the expected number of times.' , ( done ) => {
155- let runner = new GCodeRunner ( ) ;
154+ const runner = new GCodeRunner ( ) ;
156155 runner . loadFromFile ( 'test/fixtures/circle.nc' , ( err , results ) => {
157156 expect ( calls . G0 ) . to . equal ( 2 ) ;
158157 expect ( calls . G1 ) . to . equal ( 1 ) ;
@@ -162,8 +161,8 @@ describe('G-code Interpreter', (done) => {
162161 } ) ;
163162 } ) ;
164163
165- describe ( 'G-code: 1 inch circle' , ( done ) => {
166- let calls = { } ;
164+ describe ( 'G-code: 1 inch circle' , ( ) => {
165+ const calls = { } ;
167166
168167 class GCodeRunner extends GCodeInterpreter {
169168 constructor ( options ) {
@@ -199,7 +198,7 @@ describe('G-code Interpreter', (done) => {
199198 }
200199
201200 it ( 'should call each function with the expected number of times.' , ( done ) => {
202- let runner = new GCodeRunner ( ) ;
201+ const runner = new GCodeRunner ( ) ;
203202 runner . loadFromFile ( 'test/fixtures/one-inch-circle.nc' , ( err , results ) => {
204203 expect ( calls . G0 ) . to . equal ( 4 ) ;
205204 expect ( calls . G1 ) . to . equal ( 2 ) ;
0 commit comments