File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import { Logger , Options , ParameterType , ParameterScope } from '../../../lib/utils' ;
2- import { NumberDeclarationOption } from '../../../lib/utils/options' ;
2+ import { MapDeclarationOption , NumberDeclarationOption } from '../../../lib/utils/options' ;
33import { deepStrictEqual as equal , throws } from 'assert' ;
44import { DeclarationOption } from '../../../lib/utils/options' ;
55
@@ -91,9 +91,8 @@ describe('Options', () => {
9191 options . removeDeclarationByName ( declaration . name ) ;
9292 } ) ;
9393
94- it ( 'Does not error if a map declaration has a default value that is not part of the map of possible values' , ( ) => {
95- logger . resetErrors ( ) ;
96- options . addDeclaration ( {
94+ it ( 'Does not throw if a map declaration has a default value that is not part of the map of possible values' , ( ) => {
95+ const declaration : MapDeclarationOption < number > = {
9796 name : 'testMapDeclarationWithForeignDefaultValue' ,
9897 help : '' ,
9998 type : ParameterType . Map ,
@@ -102,8 +101,9 @@ describe('Options', () => {
102101 [ 'b' , 2 ]
103102 ] ) ,
104103 defaultValue : 0
105- } ) ;
106- equal ( logger . hasErrors ( ) , false ) ;
104+ } ;
105+ options . addDeclaration ( declaration ) ;
106+ options . removeDeclarationByName ( declaration . name ) ;
107107 } ) ;
108108
109109 it ( 'Supports removing a declaration by name' , ( ) => {
You can’t perform that action at this time.
0 commit comments