@@ -363,10 +363,21 @@ describe('debug', () => {
363363 const actual = createConfigId ( { fqbn : 'a:b:c' } , 'p' ) ;
364364 assert . strictEqual ( actual , 'a:b:c:programmer=p' ) ;
365365 } ) ;
366+
367+ it ( 'should create the configuration ID when the FQBN has no custom board options (no programmer)' , ( ) => {
368+ const actual = createConfigId ( { fqbn : 'a:b:c' } , undefined ) ;
369+ assert . strictEqual ( actual , 'a:b:c' ) ;
370+ } ) ;
371+
366372 it ( 'should create the configuration ID when the FQBN has custom board options' , ( ) => {
367373 const actual = createConfigId ( { fqbn : 'a:b:c:o1=v1' } , 'p' ) ;
368374 assert . strictEqual ( actual , 'a:b:c:o1=v1,programmer=p' ) ;
369375 } ) ;
376+
377+ it ( 'should create the configuration ID when the FQBN has custom board options (no programmer)' , ( ) => {
378+ const actual = createConfigId ( { fqbn : 'a:b:c:o1=v1' } , undefined ) ;
379+ assert . strictEqual ( actual , 'a:b:c:o1=v1' ) ;
380+ } ) ;
370381 } ) ;
371382 describe ( 'createName' , ( ) => {
372383 it ( 'should use the generated config ID if the board name is absent' , ( ) => {
@@ -386,19 +397,37 @@ describe('debug', () => {
386397 ) ;
387398 } ) ;
388399
400+ it ( 'should use the generated config ID with the custom board options if the board name is absent (no programmer)' , ( ) => {
401+ const board = { fqbn : 'a:b:c:UsbMode=default' } ;
402+ const actual = createName ( board , undefined ) ;
403+ assert . strictEqual ( actual , 'Arduino (a:b:c:UsbMode=default)' ) ;
404+ } ) ;
405+
389406 it ( 'should use the board name' , ( ) => {
390407 const board = { fqbn : 'a:b:c' , name : 'board name' } ;
391408 const programmer = 'p1' ;
392409 const actual = createName ( board , programmer ) ;
393410 assert . strictEqual ( actual , 'board name (p1)' ) ;
394411 } ) ;
395412
413+ it ( 'should use the board name (no programmer)' , ( ) => {
414+ const board = { fqbn : 'a:b:c' , name : 'board name' } ;
415+ const actual = createName ( board , undefined ) ;
416+ assert . strictEqual ( actual , 'board name' ) ;
417+ } ) ;
418+
396419 it ( 'should use the board name and all custom board options' , ( ) => {
397420 const board = { fqbn : 'a:b:c:UsbMode=default' , name : 'board name' } ;
398421 const programmer = 'p1' ;
399422 const actual = createName ( board , programmer ) ;
400423 assert . strictEqual ( actual , 'board name (UsbMode=default,p1)' ) ;
401424 } ) ;
425+
426+ it ( 'should use the board name and all custom board options (no programmer)' , ( ) => {
427+ const board = { fqbn : 'a:b:c:UsbMode=default' , name : 'board name' } ;
428+ const actual = createName ( board , undefined ) ;
429+ assert . strictEqual ( actual , 'board name (UsbMode=default)' ) ;
430+ } ) ;
402431 } ) ;
403432
404433 describe ( 'isCustomDebugConfig' , ( ) => {
0 commit comments