File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,10 @@ const listFiles = async (dir) => {
45
45
*/
46
46
const getInfo = ( asyncapi ) => {
47
47
if ( ! asyncapi ) {
48
- throw new Error ( 'Provided AsyncAPI document is invaild .' ) ;
48
+ throw new Error ( 'Make sure you pass AsyncAPI document as an argument .' ) ;
49
49
}
50
50
if ( ! asyncapi . info ) {
51
- throw new Error ( 'Provided AsyncAPI document doesn\'t contain info .' ) ;
51
+ throw new Error ( 'Provided AsyncAPI document doesn\'t contain Info object .' ) ;
52
52
}
53
53
const info = asyncapi . info ( ) ;
54
54
if ( ! info ) {
Original file line number Diff line number Diff line change @@ -71,13 +71,13 @@ describe('getInfo integration test with AsyncAPI', () => {
71
71
it ( 'should throw error when info method is missing' , ( ) => {
72
72
const invalidAsyncAPIDocument = { } ;
73
73
expect ( ( ) => getInfo ( invalidAsyncAPIDocument ) ) . toThrowError (
74
- 'Provided AsyncAPI document doesn\'t contain info .'
74
+ 'Provided AsyncAPI document doesn\'t contain Info object .'
75
75
) ;
76
76
} ) ;
77
77
78
- it ( 'should throw error when AsyncAPI document is invalid ' , ( ) => {
78
+ it ( 'should throw error when AsyncAPI document is missing ' , ( ) => {
79
79
expect ( ( ) => {
80
80
getInfo ( null ) ;
81
- } ) . toThrow ( 'Provided AsyncAPI document is invaild .' ) ;
81
+ } ) . toThrow ( 'Make sure you pass AsyncAPI document as an argument .' ) ;
82
82
} ) ;
83
83
} ) ;
You can’t perform that action at this time.
0 commit comments