<commit_before>const expect = require('chai').expect;
const assert = require('chai').assert;

import { Observer } from "../observer";

describe('observer subscribe', () => {

    const observer = new Observer();
    const fn = () => {};
    observer.subscribe(fn);
    assert.lengthOf(observer.observers.length, 1, 'has length 1');
<commit_msg>More javascript and tests.<commit_after>const expect = require('chai').expect;
const assert = require('chai').assert;

import { Observer } from "../observer";

describe('observer subscribe', () => {

    const observer = new Observer();
    const fn = () => {};
    observer.subscribe(fn);
    assert.lengthOf(observer.observers, 1, 'has length 1');

{'fraction_non_alphanumeric': 0.1729106628242075, 'fraction_numerical': 0.005763688760806916, 'mean_word_length': 4.265151515151516, 'pattern_counts': {'":': 0, '<': 3, '<?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': '342717', 'n_tokens_mistral': 214, 'n_tokens_neox': 193, 'n_words': 51}