<commit_before>xdescribe('The hotspotService', function () {
    var $rootScope,
        hotspotService;

    beforeEach(function () {
        angular.mock.module(
            'dpStraatbeeld',
            function ($provide) {
                $provide.factory('dpHotspotDirective', function () {
                    return {};
                });
            }
        );

        angular.mock.inject(function (_$rootScope_, _hotspotService_) {
            $rootScope = _$rootScope_;
            hotspotService = _hotspotService_;
        });
    });

    it('creates hotspot HTML', function () {
        hotspotService.createHotspot(789, 15).then(function (template) {
            var html = template.outerHTML;

            expect(html).toContain('<dp-hotspot scene-id="789" distance="15"');
        });

        $rootScope.$apply();
    });

    it('calculates the location of the hotspot', function () {
        var absolutePosition,
            panoramaState,
            hotspot;

        panoramaState = {
            carOrientation: {
                heading: 2,
                pitch: 0.5
            }
        };

        hotspot = {<commit_msg>Unit tests hotspot<commit_after>fdescribe('The hotspotService', function () {
    var $rootScope,
        hotspotService;

    beforeEach(function () {
        angular.mock.module(
            'dpStraatbeeld',
            function ($provide) {
                $provide.factory('dpHotspotDirective', function () {
                    return {};
                });
            }
        );

        angular.mock.inject(function (_$rootScope_, _hotspotService_) {
            $rootScope = _$rootScope_;
            hotspotService = _hotspotService_;
        });
    });

    it('creates hotspot HTML', function () {
        hotspotService.createHotspotTemplate(789, 15).then(function (template) {
            var html = template.outerHTML,
                scope = angular.element(template).scope();

            expect(html).toContain('<dp-hotspot scene-id="sceneId" distance="distance"');
            expect(scope.sceneId).toBe(789);
            expect(scope.distance).toBe(15);
        });

        $rootScope.$apply();
    });

    it('calculates the location of the hotspot', function () {
        var absolutePosition,
            panoramaState,
            hotspot;

        panoramaState = {
            carOrientation: {
                heading: 2,
                pitch: 0.5
            }
        };

        hotspot = {
{'fraction_non_alphanumeric': 0.11845286059629331, 'fraction_numerical': 0.010475423045930701, 'mean_word_length': 1.6584582441113491, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '827373', 'n_tokens_mistral': 694, 'n_tokens_neox': 642, 'n_words': 112}