GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing angular.dev — createAngularJSTestingModule • Angular @paramangularModules any[]a collection of Angular modules to include in the configuration. @returns stringDescriptionA helper function to use when unit testing AngularJS services that depend upon downgraded Angular services. This function returns an AngularJS module that is configured to wire up the AngularJS and Angular injectors without the need to actually bootstrap a hybrid application. This makes it simpler and faster to unit test services. Use the returned AngularJS module in a call to
In the following code snippet, we are configuring the
Once this is done we can get hold of services via the AngularJS In the following code snippet,
This helper is for testing services not components.
For Component testing you must still bootstrap a hybrid app. See The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the
responsibility of the test writer to call The helper sets up global variables to hold the shared Angular and AngularJS injectors.
Here is the example application and its unit tests that use |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |