2016-02-08 11:32:39 -05:00
|
|
|
describe("AnimeClient Base", () => {
|
|
|
|
it("AnimeClient exists", () => {
|
|
|
|
expect(AnimeClient).toBeDefined();
|
|
|
|
});
|
|
|
|
describe('AnimeClient methods exist', () => {
|
|
|
|
['scrollToTop', 'showMessage', 'url', 'throttle', 'on'].forEach((method) => {
|
|
|
|
it("AnimeClient." + method + ' exists.', () => {
|
|
|
|
expect(AnimeClient[method]).toBeDefined();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('AnimeClient.url', () => {
|
2016-02-08 13:37:44 -05:00
|
|
|
it('url method has expected result', () => {
|
|
|
|
let expected = `//${document.location.host}/path`;
|
|
|
|
expect(AnimeClient.url('/path')).toBe(expected);
|
|
|
|
});
|
2016-02-08 11:32:39 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
describe('AnimeClient.ajax', () => {
|
|
|
|
|
|
|
|
});
|