Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(zone.js): include jasmine
describe
block name when raising une…
…xpected task error As mentioned in the previous commit that ensured that the Zone name is included in errors raised by the `SyncTestZoneSpec`, we can now include the Jasmine describe block descriptions in such errors. Errors can often happen when users accidentally try to set up Angular tests without an `it` block. Resulting in errors where it's not clear at all which describe block (of potentially a large repository) is involved: ``` An error was thrown in afterAll error properties: Object({ originalStack: 'Error: Cannot call XX from within a sync test. at new ZoneAwareError (packages/zone.js/test/browser_test_rollup.umd.js:98:37) at e.onScheduleTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:158:196) at e.scheduleTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:14:7529) at t.scheduleTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:14:3539) at t.scheduleMicroTask (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:14:3791) at r.execute (packages/zone.js/bundles/zone-testing-bundle.umd.min.js:166:4372) at queueRunnerFa ... at <Jasmine> ``` We now include the describe block description in the error, so that it is easier to figure out the location of the culprit code.
- Loading branch information