<commit_before>describe('The dp-site-header component', () => {
    let $compile,
        $rootScope,
        $window,
        origAuth,
        mockedUser,
        $timeout;

    beforeEach(() => {
        angular.mock.module(
            'dpHeader',
            {
                store: {
                    dispatch: angular.noop
                }
            }
        );

        angular.mock.inject((_$compile_, _$rootScope_, _$window_, _$timeout_) => {
            $compile = _$compile_;
            $rootScope = _$rootScope_;
            $window = _$window_;
            $timeout = _$timeout_;
        });

        origAuth = $window.auth;
        $window.auth = {
            login: angular.noop
        };

        mockedUser = {
            authenticated: false,
            scopes: [],
            name: ''
        };
    });

    afterEach(() => {
        $window.auth = origAuth;
    });

    function getComponent (query, size) {
        const element = document.createElement('dp-site-header');<commit_msg>Karma tests work now, only a few jest failing?<commit_after>describe('The dp-site-header component', () => {
    let $compile,
        $rootScope,
        $window,
        mockedUser,
        $timeout,
        originalWindow;


    beforeEach(() => {
        angular.mock.module(
            'dpHeader',
            {
                store: {
                    dispatch: angular.noop
                }
            }
        );

        angular.mock.inject((_$compile_, _$rootScope_, _$window_, _$timeout_) => {
            $compile = _$compile_;
            $rootScope = _$rootScope_;
            $window = _$window_;
            $timeout = _$timeout_;
        });

        originalWindow = $window;

        $window.auth = {
            login: angular.noop
        };

        mockedUser = {
            authenticated: false,
            scopes: [],
            name: ''
        };
    });

    afterEach(() => {
        $window = originalWindow;
    });

    function getComponent (query, size) {
        const element = document.createElement('dp-site-header');
{'fraction_non_alphanumeric': 0.1273336524652944, 'fraction_numerical': 0.0, 'mean_word_length': 1.3723041997729852, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4940443', 'n_tokens_mistral': 581, 'n_tokens_neox': 551, 'n_words': 103}