<commit_before>var expect = require('expect.js');
var sinon = require('sinon');

describe('the SDK interface', function () {
    it('should be an object', function () {
        expect(AT).to.be.an('object');
    });

    it('should have an init function', function () {
        expect(AT.init).to.be.a('function');
    });

    it('should have a synchronous send function', function () {
        expect(AT.send).to.be.a('function');
    });

    it('should have an addEventListener function', function () {
        expect(AT.addEventListener).to.be.a('function');
    });
});

describe('the init function', function () {
    it('should register a TouchpointSaved event listener', function () {
        AT.init();
    });
});

describe('the send function', function () {
    it('should emit a TouchpointSaved event', function () {
    });

    xit('should log in the console if the _at object is missing', function () {
        AT.send({}, function (res) {
            expect(/present/.test(window.console)).to.not.be(null);
            console.log(/present/.test(window.console));
        });
    });
});<commit_msg>added a couple of tests<commit_after>var expect = require('expect.js');
var sinon = require('sinon');

describe('the SDK interface', function () {
    it('should be an object', function () {
        expect(AT).to.be.an('object');
    });

    it('should have an init function', function () {
        expect(AT.init).to.be.a('function');
    });

    it('should have a send function', function () {
        expect(AT.send).to.be.a('function');
    });

    it('should have a sendSharepoint function', function () {
        expect(AT.sendSharepoint).to.be.a('function');
    });

    it('should have a sendTouchpoint function', function () {
        expect(AT.sendTouchpoint).to.be.a('function');
    });

    it('should have an addEventListener function', function () {
        expect(AT.addEventListener).to.be.a('function');
    });

    it('should expose an enum of events', function () {
        expect(AT.Events).to.be.an('object');
        expect(AT.Events.TouchpointSaved).to.be.a('string');
        expect(AT.Events.SharepointSaved).to.be.a('string');
        expect(AT.Events.ReferredPerson).to.be.a('string');
    });
});

describe('the init function', function () {
    it('should register a TouchpointSaved event listener', function () {
        var myListener = function () {};
        AT.addEventListener('TouchpointSaved', myListener);

        console.log(listeners);
    });
});

describe('the send function', function () {
    it('should emit a TouchpointSaved event', function () {
    });

    xit('should log in the console if the _at object is missing', function () {
        AT.send({}, function (res) {
            expect(/present/.test(window.console)).to.not.be(null);
            console.log(/present/.test(window.console));
        });
    });
});
{'fraction_non_alphanumeric': 0.17577854671280277, 'fraction_numerical': 0.0, 'mean_word_length': 2.949453551912568, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5846432', 'n_tokens_mistral': 840, 'n_tokens_neox': 816, 'n_words': 187}