@@ -20,7 +20,7 @@ describe('valueSetUtils', () => {
20
20
expect ( ( ) => loadJsonVs ( ) ) . toThrow ( ) ;
21
21
} ) ;
22
22
test ( 'should throw when file does not exist' , ( ) => {
23
- expect ( ( ) => loadJsonVs ( './path/does/not/exist' ) ) . toThrow ( ) ;
23
+ expect ( ( ) => loadJsonVs ( './path/does/not/exist' ) ) . toThrow ( "ENOENT: no such file or directory, open './path/does/not/exist'" ) ;
24
24
} ) ;
25
25
test ( 'should load from the supplied filepath' , ( ) => {
26
26
const valueSetFilePath = path . resolve ( __dirname , 'fixtures' , 'valueset-without-expansion.json' ) ;
@@ -30,13 +30,13 @@ describe('valueSetUtils', () => {
30
30
31
31
describe ( 'loadVs' , ( ) => {
32
32
test ( 'should throw an error when xml type is provided' , ( ) => {
33
- expect ( ( ) => loadVs ( undefined , vsTypes . xml ) ) . toThrow ( ) ;
33
+ expect ( ( ) => loadVs ( undefined , vsTypes . xml ) ) . toThrow ( 'No defined valueset loader for `xml` type valuesets' ) ;
34
34
} ) ;
35
35
test ( 'should throw an error when turtle is provided' , ( ) => {
36
- expect ( ( ) => loadVs ( undefined , vsTypes . turtle ) ) . toThrow ( ) ;
36
+ expect ( ( ) => loadVs ( undefined , vsTypes . turtle ) ) . toThrow ( 'No defined valueset loader for `turtle` type valuesets' ) ;
37
37
} ) ;
38
38
test ( 'should throw an error when an unrecoginized type is provided' , ( ) => {
39
- expect ( ( ) => loadVs ( undefined , vsTypes . newType ) ) . toThrow ( ) ;
39
+ expect ( ( ) => loadVs ( undefined , vsTypes . newType ) ) . toThrow ( "'undefined' is not a recognized valueset type" ) ;
40
40
} ) ;
41
41
test ( 'Should load a vs properly for json' , ( ) => {
42
42
const valueSetFilePath = path . resolve ( __dirname , 'fixtures' , 'valueset-without-expansion.json' ) ;
0 commit comments