<commit_before>describe("Inspector", function () {
    var inspector, element, entity = iD.Entity({type: 'node', id: "n12345", tags: {}});

    beforeEach(function () {
        inspector = iD.Inspector();
        element = d3.select('body')
            .append('div')
            .attr('id', 'inspector-wrap')
            .datum(entity)
            .call(inspector);
    });

    afterEach(function () {
        element.remove();
    });

    it("emits a close event when the close button is clicked", function () {
        var spy = jasmine.createSpy();
        inspector.on('close', spy);

        happen.click(element.select('.close').node());

        expect(spy).toHaveBeenCalledWith(entity);
    });

    it("emits a change event when the save button is clicked", function () {
        var spy = jasmine.createSpy();
        inspector.on('change', spy);

        happen.click(element.select('.save').node());

        expect(spy).toHaveBeenCalledWith(entity, { '': '' });
    });

    it("emits a remove event when the delete button is clicked", function () {
        var spy = jasmine.createSpy();
        inspector.on('remove', spy);

        happen.click(element.select('.delete').node());

        expect(spy).toHaveBeenCalledWith(entity);
    });
});<commit_msg>Fix spec<commit_after>describe("Inspector", function () {
    var inspector, element, entity = iD.Entity({type: 'node', id: "n12345", tags: {}});

    beforeEach(function () {
        inspector = iD.Inspector();
        element = d3.select('body')
            .append('div')
            .attr('id', 'inspector-wrap')
            .datum(entity)
            .call(inspector);
    });

    afterEach(function () {
        element.remove();
    });

    it("emits a close event when the close button is clicked", function () {
        var spy = jasmine.createSpy();
        inspector.on('close', spy);

        happen.click(element.select('.close').node());

        expect(spy).toHaveBeenCalledWith(entity);
    });

    it("emits a changeTags event when the save button is clicked", function () {
        var spy = jasmine.createSpy();
        inspector.on('changeTags', spy);

        happen.click(element.select('.save').node());

        expect(spy).toHaveBeenCalledWith(entity, {});
    });

    it("emits a remove event when the delete button is clicked", function () {
        var spy = jasmine.createSpy();
        inspector.on('remove', spy);

        happen.click(element.select('.delete').node());

        expect(spy).toHaveBeenCalledWith(entity);
    });
});
{'fraction_non_alphanumeric': 0.16646989374262103, 'fraction_numerical': 0.004722550177095631, 'mean_word_length': 2.5552447552447553, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3912739', 'n_tokens_mistral': 767, 'n_tokens_neox': 734, 'n_words': 155}