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

15 lines
436 B
JavaScript

import { expect } from '@open-wc/testing';
import { http, setHttp } from '../src/http.js';
import { HttpClient } from '../src/HttpClient.js';
describe('http', () => {
it('exports an instance of HttpClient', () => {
expect(http).to.be.an.instanceOf(HttpClient);
});
it('can replace http with another instance', () => {
const newHttp = new HttpClient();
setHttp(newHttp);
expect(http).to.equal(newHttp);
});
});