11import { getFullPackConfig } from '../config' ;
2- import { readGlobalErrors } from '../fs' ;
2+ import { readGlobalErrors , readGlobalWarnings } from '../fs' ;
33import {
44 collectTestFilePaths ,
55 getUnsuccessfulTestFilePaths ,
@@ -8,16 +8,22 @@ import {
88
99import type { FullTestRun , TestFilePath } from '../../types/internal' ;
1010
11+ type Return = Readonly < {
12+ errors : readonly string [ ] ;
13+ warnings : readonly string [ ] ;
14+ } > ;
15+
1116/**
12- * Get all report errors. General report status is failed if there is any error.
17+ * Get all report errors and warnings . General report status is failed if there is any error.
1318 * @internal
1419 */
1520export const getReportErrors = async (
1621 fullTestRuns : readonly FullTestRun [ ] ,
1722 notIncludedInPackTests : readonly TestFilePath [ ] ,
18- ) : Promise < readonly string [ ] > => {
23+ ) : Promise < Return > => {
1924 const { testFileGlobs} = getFullPackConfig ( ) ;
2025 const errors = ( await readGlobalErrors ( ) ) as string [ ] ;
26+ const warnings = await readGlobalWarnings ( ) ;
2127
2228 const allTestFilePaths = await collectTestFilePaths ( ) ;
2329 const unsuccessfulTestFilePaths = await getUnsuccessfulTestFilePaths (
@@ -55,5 +61,5 @@ export const getReportErrors = async (
5561 ) ;
5662 }
5763
58- return errors ;
64+ return { errors, warnings } ;
5965} ;
0 commit comments