import {expect} from "chai"
import {ObservableQueue} from "../../../source/types/observablequeue.mjs";
import {Observer} from "../../../source/types/observer.mjs";

describe('ObservableQueue', function () {
    describe('Observer', function () {

        it('should notify', function (done) {
            let queue = new ObservableQueue;
            let o = new Observer((q) => {
                done()
            });
            queue.attachObserver(o);
            expect(queue.add('a')).to.be.instanceOf(ObservableQueue);
        });
    });
})