mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
Add integration test
This commit is contained in:
@@ -5,6 +5,15 @@ declare var global: any;
|
||||
const jsdom = new JSDOM("<!doctype html><html><body></body></html>");
|
||||
const { window } = jsdom;
|
||||
|
||||
// tiny shim for getSelection for the RTE.
|
||||
// tslint:disable:no-empty
|
||||
window.getSelection = () =>
|
||||
({
|
||||
addRange() {},
|
||||
removeAllRanges() {},
|
||||
} as any);
|
||||
// tslint:enable:no-empty
|
||||
|
||||
function copyProps(src: any, target: any) {
|
||||
const props = Object.getOwnPropertyNames(src)
|
||||
.filter(prop => typeof target[prop] === "undefined")
|
||||
|
||||
Reference in New Issue
Block a user