mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 05:25:53 +08:00
test(core): enable no-floating-promises rule for tests (#11915)
Sometimes, missing `await` in the test code can cause timing issues, leading to test failures. This PR enables the `no-floating-promises` rule for the test code to ensure that such errors do not occur.
This commit is contained in:
@@ -473,7 +473,7 @@ export async function createEdgelessNoteBlock(
|
||||
) {
|
||||
await setEdgelessTool(page, 'note', undefined, editorIndex);
|
||||
if (position.length === 4) {
|
||||
dragView(
|
||||
await dragView(
|
||||
page,
|
||||
[position[0], position[1]],
|
||||
[position[0] + position[2], position[1] + position[3]]
|
||||
|
||||
@@ -122,7 +122,7 @@ export const addCustomProperty = async (
|
||||
root: Locator | Page,
|
||||
type: string
|
||||
) => {
|
||||
ensureAddPropertyButtonVisible(page, root);
|
||||
await ensureAddPropertyButtonVisible(page, root);
|
||||
await clickAddPropertyButton(root);
|
||||
await page
|
||||
.locator(
|
||||
|
||||
Reference in New Issue
Block a user