File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 99 getRepositoryHttpsUrl ,
1010 getTags ,
1111} from './git-operations' ;
12+ import type { PackageMetadata } from './package-operations' ;
1213
1314jest . mock ( 'execa' ) ;
1415const execaMock : jest . Mock = execa as any ;
@@ -241,4 +242,15 @@ describe('didPackageChange', () => {
241242 ) . rejects . toThrow ( / n o c o r r e s p o n d i n g t a g / u) ;
242243 expect ( execaMock ) . not . toHaveBeenCalled ( ) ;
243244 } ) ;
245+
246+ it ( 'throws if metadata is empty' , async ( ) => {
247+ await expect (
248+ didPackageChange ( PARSED_MOCK_TAGS , {
249+ manifest : { } ,
250+ dirName : PACKAGES . A . dir ,
251+ dirPath : `packages/${ PACKAGES . A . dir } ` ,
252+ } as PackageMetadata ) ,
253+ ) . rejects . toThrow ( / u n d e f i n e d .* v u n d e f i n e d / u) ;
254+ expect ( execaMock ) . not . toHaveBeenCalled ( ) ;
255+ } ) ;
244256} ) ;
You can’t perform that action at this time.
0 commit comments