aboutsummaryrefslogtreecommitdiffstats
path: root/test/InjectorSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/InjectorSpec.js')
-rw-r--r--test/InjectorSpec.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/InjectorSpec.js b/test/InjectorSpec.js
index cc5c5b50..16cf1524 100644
--- a/test/InjectorSpec.js
+++ b/test/InjectorSpec.js
@@ -147,6 +147,12 @@ describe('injector', function() {
});
+ it('should strip leading and trailing underscores from arg name during inference', function() {
+ function beforeEachFn(_foo_) { /* foo = _foo_ */ };
+ expect(inferInjectionArgs(beforeEachFn)).toEqual(['foo']);
+ });
+
+
it('should handle no arg functions', function() {
function $f_n0() {}
expect(inferInjectionArgs($f_n0)).toEqual([]);