diff --git a/tools/cjs-jasmine/index.ts b/tools/cjs-jasmine/index.ts index b108a42be2..b9ddea570a 100644 --- a/tools/cjs-jasmine/index.ts +++ b/tools/cjs-jasmine/index.ts @@ -33,7 +33,7 @@ if (globsIndex < 0) { var specFiles: any = args.map(function(globstr: string): string[] { - var tests: string[] = glob.sync(globstr, { + return glob.sync(globstr, { cwd: distAll, ignore: [ // the following code and tests are not compatible with CJS/node environment @@ -50,11 +50,9 @@ var specFiles: any = 'payload_tests/**' ] }); - // The security spec however works (and must work!) on the server side. - tests = tests.concat( - glob.sync('@angular/platform-browser/test/security/**/*_spec.js', {cwd: distAll})); - return tests; }) + // The security spec however works (and must work!) on the server side. + .concat(glob.sync('@angular/platform-browser/test/security/**/*_spec.js', {cwd: distAll})) .reduce((specFiles: string[], paths: string[]) => specFiles.concat(paths), []); jasmine.DEFAULT_TIMEOUT_INTERVAL = 100;