lion/packages/ajax/test/ajax.test.js
2021-02-10 15:42:37 +01:00

14 lines
393 B
JavaScript

import { expect } from '@open-wc/testing';
import { ajax, setAjax, AjaxClient } from '@lion/ajax';
describe('ajax', () => {
it('exports an instance of AjaxClient', () => {
expect(ajax).to.be.an.instanceOf(AjaxClient);
});
it('can replace ajax with another instance', () => {
const newAjax = new AjaxClient();
setAjax(newAjax);
expect(ajax).to.equal(newAjax);
});
});