@lvce-editor/test-worker 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/testWorkerMain.js +7 -0
- package/package.json +1 -1
package/dist/testWorkerMain.js
CHANGED
|
@@ -1464,6 +1464,12 @@ const showHover = async () => {
|
|
|
1464
1464
|
const openRename = async () => {
|
|
1465
1465
|
await invoke('Editor.openRename');
|
|
1466
1466
|
};
|
|
1467
|
+
const shouldHaveText = async expectedText => {
|
|
1468
|
+
const text = await invoke('Editor.getText');
|
|
1469
|
+
if (text !== expectedText) {
|
|
1470
|
+
throw new Error(`Expected editor to have text ${expectedText} but was ${text}`);
|
|
1471
|
+
}
|
|
1472
|
+
};
|
|
1467
1473
|
|
|
1468
1474
|
const TestFrameWorkComponentEditor = {
|
|
1469
1475
|
__proto__: null,
|
|
@@ -1511,6 +1517,7 @@ const TestFrameWorkComponentEditor = {
|
|
|
1511
1517
|
setCursor,
|
|
1512
1518
|
setDeltaY,
|
|
1513
1519
|
setSelections,
|
|
1520
|
+
shouldHaveText,
|
|
1514
1521
|
showHover,
|
|
1515
1522
|
sortImports,
|
|
1516
1523
|
sourceActionsSelectCurrent,
|