diff options
| author | Andreas Marek | 2013-07-24 21:20:39 +0200 | 
|---|---|---|
| committer | Jeff Cross | 2013-07-31 15:50:12 -0700 | 
| commit | 3fdbe81a337c39027929c415e719493755cd8583 (patch) | |
| tree | c2d81d085d6464f0a745f1305614cbf4ac7328a2 /test | |
| parent | ca3e0c8ce5e1d6fa18346800023d3864c1d83a81 (diff) | |
| download | angular.js-3fdbe81a337c39027929c415e719493755cd8583.tar.bz2 | |
feat(scenario): expose jQuery for usage outside of angular scenario
The global jQuery reference is removed by angular scenario and only a local scoped reference is kept. To make jQuery available for other code, a new reference angular.scenario.jQuery is added.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ngScenario/ScenarioSpec.js | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ngScenario/ScenarioSpec.js b/test/ngScenario/ScenarioSpec.js index cc2efd1e..898075cb 100644 --- a/test/ngScenario/ScenarioSpec.js +++ b/test/ngScenario/ScenarioSpec.js @@ -29,4 +29,16 @@ describe("ScenarioSpec: Compilation", function() {        expect(jqLite(element).text()).toEqual('123');      }));    }); + +  describe('jQuery', function () { +    it('should exist on the angular.scenario object', function () { +      expect(angular.scenario.jQuery).toBeDefined(); +    }); + +    it('should have common jQuery methods', function () { +      var jQuery = angular.scenario.jQuery; +      expect(typeof jQuery).toEqual('function'); +      expect(typeof jQuery('<div></div>').html).toEqual('function'); +    }) +  });  });  | 
