<commit_before>'use strict';

import * as ng from 'angular';

describe('linkDirective: <uif-link />', () => {
    let element: ng.IAugmentedJQuery;
    let scope: ng.IScope;

    beforeEach(() => {
        angular.mock.module('officeuifabric.core');
        angular.mock.module('officeuifabric.components.link');
    });

    beforeEach(inject(($rootScope: ng.IRootScopeService, $compile: Function) => {
        element = ng.element('<uif-link ng-href="http://ngofficeuifabric.com">Link Text</uif-link>');
        scope = $rootScope;
        $compile(element)(scope);
        scope.$digest();
    }));


    it('should render as an <a>', () => {

        let aElement: ng.IAugmentedJQuery = element;

        expect(aElement).toEqual('a');

    });


    it('should have an href attribute', () => {

        let aElement: ng.IAugmentedJQuery = element;

        expect(aElement).toHaveAttr('href');

    });


    it('should render correct Office UI Fabric CSS classes', () => {

        let aElement: ng.IAugmentedJQuery = element;

        // ensure link has the correct classes
        expect(aElement.eq(0)).toHaveClass('ms-Link');

    });


    it('should render the correct text', () => {

        let aElement: ng.IAugmentedJQuery = element;

        // make sure it has the correct text
        expect(aElement.eq(0)).toHaveText('Link Text');

    });



});<commit_msg>fix(link): update tests to address jQuery<commit_after>'use strict';

import * as ng from 'angular';

describe('linkDirective: <uif-link />', () => {
    let element: JQuery;
    let scope: ng.IScope;

    beforeEach(() => {
        angular.mock.module('officeuifabric.core');
        angular.mock.module('officeuifabric.components.link');
    });

    beforeEach(inject(($rootScope: ng.IRootScopeService, $compile: Function) => {
        element = ng.element('<uif-link ng-href="http://ngofficeuifabric.com">Link Text</uif-link>');
        scope = $rootScope;
        $compile(element)(scope);
        scope.$digest();
        element = jQuery(element[0]);
    }));


    it('should render as an <a>', () => {

        let aElement: JQuery = element;

        expect(aElement).toEqual('a');

    });


    it('should have an href attribute', () => {

        let aElement: JQuery = element;

        expect(aElement).toHaveAttr('href');

    });


    it('should render correct Office UI Fabric CSS classes', () => {

        let aElement: JQuery = element;

        // ensure link has the correct classes
        expect(aElement.eq(0)).toHaveClass('ms-Link');

    });


    it('should render the correct text', () => {

        let aElement: JQuery = element;

        // make sure it has the correct text
        expect(aElement.eq(0)).toHaveText('Link Text');

    });



});
{'fraction_non_alphanumeric': 0.16165277274374773, 'fraction_numerical': 0.001812250815512867, 'mean_word_length': 2.68, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 25, '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': '7577278', 'n_tokens_mistral': 875, 'n_tokens_neox': 819, 'n_words': 181}