<commit_before>/* jslint node: true */
/* global describe, it, expect */

'use strict';

describe('notify', function() {
    afterAll(function() {
        window.close();
        GLOBAL.base = GLOBAL.box = GLOBAL.content = GLOBAL.notifier = null;
    });

    beforeAll(function(done) {
        var jsdom = require('jsdom');
        jsdom.env('<html><body><div class="base"></div></body></html>',
                [__dirname + '/../../jquery-2.1.4.js'], function(err, win) {
            GLOBAL.window = win;
            GLOBAL.document = win.document;
            GLOBAL.jQuery = GLOBAL.$ = require('jquery');
            require(__dirname + '/../../src/chrome/assets/js/notify.js');
            GLOBAL.base = $('div.base');
            GLOBAL.notifier = base.notify({ hide: { speed: 0 }, show: { speed: 0 }, timeout: 100 });
            GLOBAL.box = base.next('div.notify');
            GLOBAL.arrow = box.children('div.arrow');
            GLOBAL.content = box.children('div.content');
            done();
        });
    });

    beforeEach(function() {
        box.show();
    });

    it('should render error message', function() {
        notifier.error('message');<commit_msg>s/GLOBAL/global/g<commit_after>/* jslint node: true */
/* global describe, it, expect */

'use strict';

describe('notify', function() {
    afterAll(function() {
        window.close();
        global.base = global.box = global.content = global.notifier = null;
    });

    beforeAll(function(done) {
        var jsdom = require('jsdom');
        jsdom.env('<html><body><div class="base"></div></body></html>',
                [__dirname + '/../../jquery-2.1.4.js'], function(err, win) {
            global.window = win;
            global.document = win.document;
            global.jQuery = global.$ = require('jquery');
            require(__dirname + '/../../src/chrome/assets/js/notify.js');
            global.base = $('div.base');
            global.notifier = base.notify({ hide: { speed: 0 }, show: { speed: 0 }, timeout: 100 });
            global.box = base.next('div.notify');
            global.arrow = box.children('div.arrow');
            global.content = box.children('div.content');
            done();
        });
    });

    beforeEach(function() {
        box.show();
    });

    it('should render error message', function() {
        notifier.error('message');
{'fraction_non_alphanumeric': 0.18792229729729729, 'fraction_numerical': 0.006756756756756757, 'mean_word_length': 2.108923884514436, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '331261', 'n_tokens_mistral': 696, 'n_tokens_neox': 680, 'n_words': 129}