aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ngScenario/Scenario.js5
-rw-r--r--test/ngScenario/ScenarioSpec.js12
2 files changed, 17 insertions, 0 deletions
diff --git a/src/ngScenario/Scenario.js b/src/ngScenario/Scenario.js
index 4d848f2c..ff5f3470 100644
--- a/src/ngScenario/Scenario.js
+++ b/src/ngScenario/Scenario.js
@@ -10,6 +10,11 @@
angular.scenario = angular.scenario || {};
/**
+ * Expose jQuery (e.g. for custom dsl extensions).
+ */
+angular.scenario.jQuery = _jQuery;
+
+/**
* Defines a new output format.
*
* @param {string} name the name of the new output format
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');
+ })
+ });
});