"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const state_1 = require("./state");
describe('StateService', () => {
    let service;
    beforeEach(() => {
        service = new state_1.StateService();
    });
    it('should set the endpoint', () => {
        const endpoint = 'test';
        service.endpoint = endpoint;
        expect(service.endpoint).toBe(endpoint);
    });
    it('should set the options', () => {
        const opts = {
            logging: true,
        };
        service.opts = opts;
        expect(service.opts).toBe(opts);
    });
    it('should set default options if none are provided', () => {
        const opts = undefined;
        service.opts = opts;
        expect(service.opts.logging).toBeFalsy();
        expect(service.opts.port).toBe(80);
    });
    it('should set the token', () => {
        const token = 'test';
        service.token = token;
        expect(service.token).toBe(token);
    });
});
