Tests/spec/direct.spec.js   A
last analyzed

Complexity

Total Complexity 14
Complexity/F 1

Size

Lines of Code 42
Function Count 14

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 14
c 1
b 0
f 0
dl 0
loc 42
rs 10
cc 0
nc 1
mnd 0
bc 14
fnc 14
bpm 1
cpm 1
noi 4
1
describe('Direct Generator', function () {
2
    it('Test Direct Remoting exist', function() {
3
        expect(Test.TestBundle).toBeDefined();
0 ignored issues
show
Bug introduced by
The variable Test seems to be never declared. If this is a global, consider adding a /** global: Test */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
4
        expect(Test.TestBundle.Test.test).toBeDefined();
5
    });
6
    it('Execute test Remoting method', function() {
7
        var value = "";
8
        Test.TestBundle.Test.test(function(data) {
0 ignored issues
show
Bug introduced by
The variable Test seems to be never declared. If this is a global, consider adding a /** global: Test */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
9
            value = data;
10
        });
11
        waitsFor(function() {
12
            return (value != "")
13
        }, "The Value should be set", 2000);
14
        runs(function() {
15
            expect(value['result']).toBe('test');
16
        });
17
    });
18
    it('Execute test Remoting method with parameter', function() {
19
        var value = "";
20
        Test.TestBundle.Test.test2("asd", function(data) {
0 ignored issues
show
Bug introduced by
The variable Test seems to be never declared. If this is a global, consider adding a /** global: Test */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
21
            value = data;
22
        });
23
        waitsFor(function() {
24
            return (value != "")
25
        }, "The Value should be set", 2000);
26
        runs(function() {
27
            expect(value['result']).toBe('asd');
28
        });
29
    });
30
    it('Execute test Remoting method with request parameter', function() {
31
        var value = "";
32
        Test.TestBundle.Test.testRequestParam({"id":"asd"}, function(data) {
0 ignored issues
show
Bug introduced by
The variable Test seems to be never declared. If this is a global, consider adding a /** global: Test */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
33
            value = data;
34
        });
35
        waitsFor(function() {
36
            return (value != "")
37
        }, "The Value should be set", 2000);
38
        runs(function() {
39
            expect(value['result']).toBe('asd');
40
        });
41
    });
42
});