aboutsummaryrefslogtreecommitdiff
path: root/test/compress/angular-inject.js
blob: 1459361cde877044821776b66bd529a2b9b162fc (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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;
                }])
    }
}