@@ -23,7 +23,9 @@ describe('app-generator (SLOW)', function() {
2323 outdir : sandbox ,
2424 } ;
2525
26- before ( async ( ) => {
26+ before ( 'scaffold a new application' , async function createAppProject ( ) {
27+ // Increase the timeout to 1 minute to accomodate slow CI build machines
28+ this . timeout ( 60 * 1000 ) ;
2729 await helpers
2830 . run ( generator )
2931 . inDir ( sandbox )
@@ -32,21 +34,25 @@ describe('app-generator (SLOW)', function() {
3234 . withPrompts ( props ) ;
3335 } ) ;
3436
35- // Run `lerna bootstrap --scope @loopback/sandbox-app`
36- // WARNING: It takes a while to run `lerna bootstrap`
37- this . timeout ( 0 ) ;
38- before ( async ( ) => {
37+ before ( 'install dependencies' , async function installDependencies ( ) {
38+ // Run `lerna bootstrap --scope @loopback/sandbox-app `
39+ // WARNING: It takes a while to run `lerna bootstrap`
40+ this . timeout ( 15 * 60 * 1000 ) ;
3941 process . chdir ( rootDir ) ;
4042 await lernaBootstrap ( appName ) ;
4143 } ) ;
4244
43- it ( 'passes `npm test` for the generated project' , ( ) => {
44- process . chdir ( sandbox ) ;
45+ it ( 'passes `npm test` for the generated project' , function ( ) {
46+ // Increase the timeout to 5 minutes,
47+ // the tests can take more than 2 seconds to run.
48+ this . timeout ( 5 * 60 * 1000 ) ;
49+
4550 return new Promise ( ( resolve , reject ) => {
4651 build
4752 . runShell ( 'npm' , [ 'test' ] , {
4853 // Disable stdout
4954 stdio : [ process . stdin , 'ignore' , process . stderr ] ,
55+ cwd : sandbox ,
5056 } )
5157 . on ( 'close' , code => {
5258 assert . equal ( code , 0 ) ;
0 commit comments