Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Branch master (5c2c02)
by Sebastian
03:02
created

plugins/pageview/tests/spec/tx_dlf_utils.spec.js   A

Complexity

Total Complexity 9
Complexity/F 1.29

Size

Lines of Code 40
Function Count 7

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
c 0
b 0
f 0
nc 1
dl 0
loc 40
rs 10
wmc 9
mnd 1
bc 8
fnc 7
bpm 1.1428
cpm 1.2857
noi 8
1
/**
2
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
3
 *
4
 * This file is part of the Kitodo and TYPO3 projects.
5
 *
6
 * @license GNU General Public License version 3 or later.
7
 * For the full copyright and license information, please read the
8
 * LICENSE.txt file that was distributed with this source code.
9
 */
10
11
describe('Test suite for the dlfUtils', function() {
12
13
    var fulltexts = ['Yo Big wake up wake up baby', 'Mmm', 'Yo...', 'Yo Big wake yo ass up c mon', 'Dresden,'];
14
    var features = (function() {
15
        var features = [];
16
        for (var i = 0; i < fulltexts.length; i++) {
17
            var feature = new ol.Feature();
0 ignored issues
show
Bug introduced by
The variable ol seems to be never declared. If this is a global, consider adding a /** global: ol */ 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...
18
            feature.set('fulltext', fulltexts[i]);
19
            features.push(feature);
20
        }
21
        return features;
22
    })();
23
24
    describe('Test Function - searchFeatureCollectionForText', function() {
25
26
        it('Search for word which exists', function() {
27
            var response = dlfUtils.searchFeatureCollectionForText(features, 'Mmm')[0];
0 ignored issues
show
Bug introduced by
The variable dlfUtils seems to be never declared. If this is a global, consider adding a /** global: dlfUtils */ 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...
28
            expect(response instanceof ol.Feature).toBe(true);
0 ignored issues
show
Bug introduced by
The variable ol seems to be never declared. If this is a global, consider adding a /** global: ol */ 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...
29
            expect(response.get('fulltext')).toBe('Mmm');
30
        });
31
32
        it('Search for word which exists with lower case support', function() {
33
            var response = dlfUtils.searchFeatureCollectionForText(features, 'mmm')[0];
0 ignored issues
show
Bug introduced by
The variable dlfUtils seems to be never declared. If this is a global, consider adding a /** global: dlfUtils */ 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...
34
            expect(response instanceof ol.Feature).toBe(true);
0 ignored issues
show
Bug introduced by
The variable ol seems to be never declared. If this is a global, consider adding a /** global: ol */ 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...
35
            expect(response.get('fulltext')).toBe('Mmm');
36
        });
37
38
        it('Search for word does not exists', function() {
39
            var response = dlfUtils.searchFeatureCollectionForText(features, 'Mmmm');
0 ignored issues
show
Bug introduced by
The variable dlfUtils seems to be never declared. If this is a global, consider adding a /** global: dlfUtils */ 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...
40
            expect(response).toBe(undefined);
41
        });
42
43
        it('Match Dresden in case of "Dresden," given', function() {
44
            var response = dlfUtils.searchFeatureCollectionForText(features, 'Dresden')[0];
0 ignored issues
show
Bug introduced by
The variable dlfUtils seems to be never declared. If this is a global, consider adding a /** global: dlfUtils */ 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...
45
            expect(response instanceof ol.Feature).toBe(true);
0 ignored issues
show
Bug introduced by
The variable ol seems to be never declared. If this is a global, consider adding a /** global: ol */ 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...
46
            expect(response.get('fulltext')).toBe('Dresden,');
47
        });
48
    });
49
50
});
51