SOLUTION: How to get Angular Unit Testing to run ng test

I really enjoyed learning how to test my Angular projects with these lessons. Also, it’s really easy to get the sample files to work. Here’s what I did:

  1. Download the “testing-demo.zip” file in the “04- Unit Testing Fundamentals” section.
  2. Create a new Angular project. So, for example, in a new directory

ng new new-testing-demo

  1. Extract the testing-demo.zip folder on your desktop and grab ONLY the EXAMPLE FOLDERS (01-fundamentals, 02-arrays-and-strings, etc.) and drop them into your new projects “app” folder. In my case, I put the files in new-testing-demo/src/app
  2. Run “ng test” and follow along with Mosh’s videos

That’s it! :slight_smile: Happy coding everyone.

1 Like

thank you , it is very helpful.

1 Like

@miu I also made another post for the INTEGRATION testing section - SOLUTION: How to get Angular Integration Testing to run ng test

Check it out if you have any issues getting this section up and running.

1 Like

Hi Chris,
Do you have a solution for the same issue with Authentication and Authorization section?
Thanks.

Hi @afactor,
I have not written an update my self, but I know others have tried to update the Authentication and Authorization section for Angular 13.
I wish you all of the best,
Chris