blob: 581f15a96238b2e37bf29b254b188715ae718da7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* global mock, converse */
const u = converse.env.utils;
describe("Converse", function() {
it("Can be inserted into a converse-root custom element after having been initialized",
mock.initConverse([], {'root': new DocumentFragment()}, async (_converse) => {
const { api } = _converse;
expect(document.body.querySelector('#conversejs')).toBe(null);
expect(api.settings.get('root').firstElementChild.nodeName.toLowerCase()).toBe('converse-root');
document.body.appendChild(document.createElement('converse-root'));
await u.waitUntil(() => document.body.querySelector('#conversejs') !== null);
}));
});
|