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

15 lines
436 B
JavaScript

import { expect } from '@open-wc/testing';
import { ajax, setAjax } from '../src/ajax.js';
import { AjaxClient } from '../src/AjaxClient.js';
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);
});
});