@@ -63,7 +63,7 @@ describe.each(cases)("Downloading %s", (version) => {
6363 if ( version && version != "-r=latest" ) {
6464 // if we will fetch all versions from npm registry we will be able to check latest
6565 // for now we will skip this test for 'latest' version
66- test ( `version ${ version } ` , async ( ) => {
66+ test ( `Version is correct: ${ version } ` , async ( ) => {
6767 const cssContent = await fs . readFile (
6868 `./out/${ version } /css/main.css` ,
6969 "utf-8"
@@ -81,17 +81,17 @@ describe.each(cases)("Downloading %s", (version) => {
8181 } ) ;
8282 }
8383
84- test ( "./out directory exists" , async ( ) => {
84+ test ( "Target directory exists" , async ( ) => {
8585 const outDirExists = await fs . exists ( versionFolder ( version ) ) ;
8686 expect ( outDirExists ) . toBe ( true ) ;
8787 } ) ;
8888
89- test ( "./out directory have files" , async ( ) => {
89+ test ( "Target directory have files" , async ( ) => {
9090 const dirContents = await fs . readdir ( versionFolder ( version ) ) ;
91- expect ( dirContents . length ) . toBeGreaterThanOrEqual ( 5 ) ;
91+ expect ( dirContents . length ) . toBeGreaterThanOrEqual ( 7 ) ;
9292 } ) ;
9393
94- test ( "./out directory specific files" , async ( ) => {
94+ test ( "Target directory contains specific files" , async ( ) => {
9595 const dirContents = await fs . readdir ( versionFolder ( version ) ) ;
9696 const check = [
9797 "index.html" ,
@@ -104,14 +104,14 @@ describe.each(cases)("Downloading %s", (version) => {
104104 expect ( check . length === 0 ) . toBe ( true ) ;
105105 } ) ;
106106
107- test ( "Temp dir removed" , async ( ) => {
107+ test ( "Temp directory removed" , async ( ) => {
108108 const tempDirExists = await fs . exists ( tempDir ) ;
109109 expect ( tempDirExists ) . toBe ( false ) ;
110110 } ) ;
111111} ) ;
112112
113113describe ( "Errors" , ( ) => {
114- test ( "wrong version 6..2.3" , async ( ) => {
114+ test ( "Wrong version 6..2.3" , async ( ) => { //maybe create test.each() for more errors scenarios
115115 const mockExit = jest . spyOn ( process , "exit" ) . mockImplementation ( ( ) => { } ) ;
116116 const version = "-r=6..2.3" ;
117117
0 commit comments