From the course: Angular: Testing and Debugging
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Basic Karma configuration - Angular Tutorial
From the course: Angular: Testing and Debugging
Basic Karma configuration
- [Instructor] Karma is a testing environment that executes source code against a set of tests. These tests run in a browser instance and results are piped to an output of your choice. Angular includes Karma by default and configures most of the settings for you, so you can start testing your code right away. This is Karma's config file for our project. The file name is karma.conf.js. And it's located in the root directory of our project. Karma does a great job of annotating the config file and even gives you a link at the top, directing you to their documentation website. Karma's website is a great resource. And I encourage you to take a look at all the configuration options. For now, we'll focus on the default configuration for Angular projects. The basePath property sets the root path for all the relative paths used in the config file. An empty string means all paths are relative to the root of your project. But you might want to set this to source or specs or some other path that…
Contents
-
-
-
-
-
-
-
(Locked)
Testing overview2m 26s
-
(Locked)
Basic Karma configuration3m 35s
-
Testing services5m 22s
-
(Locked)
Fixing injection dependency errors6m 1s
-
(Locked)
Testing pipes4m 29s
-
(Locked)
Testing components6m 27s
-
(Locked)
Challenge: Custom test bed wrapper22s
-
(Locked)
Solution: Custom test bed wrapper1m 53s
-
(Locked)
-
-
-