After installing angular cli, I ran the below commands and able to open the application on browser.
ng new my-dream-app
cd my-dream-app
ng serve
But inorder to do testing, executed ng test command, but getting the below issue. Not sure how to proceed further.

Could you please let me know if i did any mistake.
I ran into this same issue. I was able to add
"@ngtools/webpack": "^1.6.2"
to the devDependencies as a fix for a newly generated project but this temp fix did not work with another recently created app I developed.
I read about adding a tsconfig.spec.ts as a fix as well here: https://github.com/angular/angular-cli/issues/6457
Currently still unable to fix my issue.
+1
ng -v
angular-cli: 1.0.0-beta.28.3
node: 8.3.0
os: win32 x64
Upgrading to @angular/cli: 1.3.2 solved my issues.
It appears you have a much older version of the CLI (still using the package name angular-cli)
You will want to remove that package and install the current version...
npm uninstall angular-cli -g
npm install @angular/cli -g
Also, you'll want to ensure your versions are up to date, which you can find under prerequisites
I got burned by this as well. I did see the message when running ng test which said
As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release,
However, I read this as a forewarning about something that would happen in the future, where I should have read it as something which was in the near-future of the long-ago-past, which means it's still in the past from where the present currently is.
It would have been better if whoever typed the "forewarning" instead said something like "As of __DATE__, the angular-cli repository is deprecated and you should be using @angular/cli"
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
It appears you have a much older version of the CLI (still using the package name
angular-cli)You will want to remove that package and install the current version...
Also, you'll want to ensure your versions are up to date, which you can find under prerequisites