aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/compress/angular-inject.js67
1 files changed, 67 insertions, 0 deletions
diff --git a/test/compress/angular-inject.js b/test/compress/angular-inject.js
new file mode 100644
index 00000000..1459361c
--- /dev/null
+++ b/test/compress/angular-inject.js
@@ -0,0 +1,67 @@
+ng_inject_defun: {
+ options = {
+ angular: true
+ };
+ input: {
+ /*@ngInject*/
+ function Controller(dependency) {
+ return dependency;
+ }
+ }
+ expect: {
+ function Controller(dependency) {
+ return dependency;
+ }
+ Controller.$inject=['dependency']
+ }
+}
+
+ng_inject_assignment: {
+ options = {
+ angular: true
+ };
+ input: {
+ /*@ngInject*/
+ var Controller = function(dependency) {
+ return dependency;
+ }
+ }
+ expect: {
+ var Controller = function(dependency) {
+ return dependency;
+ }
+ Controller.$inject=['dependency']
+ }
+}
+
+ng_inject_inline: {
+ options = {
+ angular: true
+ };
+ input: {
+ angular.module('a').
+ factory('b',
+ /*@ngInject*/
+ function(dependency) {
+ return dependency;
+ }).
+ directive('c',
+ /*@ngInject*/
+ function(anotherDependency) {
+ return anotherDependency;
+ })
+ }
+ expect: {
+ angular.module('a').
+ factory('b',[
+ 'dependency',
+ function(dependency) {
+ return dependency;
+ }]).
+ directive('c',[
+ 'anotherDependency',
+ function(anotherDependency) {
+ return anotherDependency;
+ }])
+ }
+} \ No newline at end of file