@@ -142,28 +142,26 @@ describe('.g0', () => {
142142
143143 expect ( job . paths . length ) . toEqual ( 0 ) ;
144144 expect ( job . inprogressPath ?. travelType ) . toEqual ( 'Extrusion' ) ;
145- } ) ;
145+ } ) ;
146146
147- test ( 'assigns the travel type if the extrusion is a retraction' , ( ) => {
147+ test ( 'will not result in a path when there is no movement ( retraction) ' , ( ) => {
148148 const command = new GCodeCommand ( 'G0 E-2' , 'g0' , { e : - 2 } ) ;
149149 const interpreter = new Interpreter ( ) ;
150150 const job = new Job ( ) ;
151151
152152 interpreter . g0 ( command , job ) ;
153153
154154 expect ( job . paths . length ) . toEqual ( 0 ) ;
155- expect ( job . inprogressPath ?. travelType ) . toEqual ( 'Travel' ) ;
156155 } ) ;
157156
158- test ( 'assigns the travel type if the extrusion is a retraction ' , ( ) => {
159- const command = new GCodeCommand ( 'G0 E-2 ' , 'g0' , { e : - 2 } ) ;
157+ test ( 'will not result in a path when there is no movement (deretraction) ' , ( ) => {
158+ const command = new GCodeCommand ( 'G0 E4 ' , 'g0' , { e : 4 } ) ;
160159 const interpreter = new Interpreter ( ) ;
161160 const job = new Job ( ) ;
162161
163162 interpreter . g0 ( command , job ) ;
164163
165164 expect ( job . paths . length ) . toEqual ( 0 ) ;
166- expect ( job . inprogressPath ?. travelType ) . toEqual ( 'Travel' ) ;
167165 } ) ;
168166
169167 test ( 'starts a new path if the travel type changes from Travel to Extrusion' , ( ) => {
0 commit comments