<commit_before>'use strict'
let assert = require('assert');
let yeah = require('../lib/yeah');

describe("application", function() {
    beforeEach(function() {
        let jsdom = require('jsdom').jsdom;
        global.document = jsdom('<html><body></body></html>')
        global.window = document.defaultView;
        global.navigator = window.navigator;
        global.location = window.location;
        yeah.createCanvas();
    });
    afterEach(function() {
        delete global.document;
        delete global.window;
        delete global.navigator;
    });
    describe('createCanvas', function() {
        it('executable without error', function() {
            assert(true);
        });
    });
    describe('setVideoElement', function() {
        it('canvas is also set to body automatically', function() {
            let videoElm = document.createElement('video');<commit_msg>update unit test to use mocha-jsdom<commit_after>'use strict'
let assert = require('assert');
let yeah = require('../lib/yeah');
let jsdom = require('mocha-jsdom');

describe("application", function() {
    jsdom();
    before(function() {
        yeah.createCanvas();
    });
    describe('createCanvas', function() {
        it('executable without error', function() {
            assert(true);
        });
    });
    describe('setVideoElement', function() {
        it('canvas is also set to body automatically', function() {
            let videoElm = document.createElement('video');
{'fraction_non_alphanumeric': 0.15192437542201215, 'fraction_numerical': 0.0, 'mean_word_length': 2.9102902374670183, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5855484', 'n_tokens_mistral': 390, 'n_tokens_neox': 388, 'n_words': 90}