-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fb180d
commit 53a301b
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import click from '../helpers/click' | ||
import clickThought from '../helpers/clickThought' | ||
import getEditingText from '../helpers/getEditingText' | ||
import paste from '../helpers/paste' | ||
|
||
vi.setConfig({ testTimeout: 20000, hookTimeout: 20000 }) | ||
|
||
it('when cursor is null, thought will be trimmed.', async () => { | ||
const importText = ` | ||
- Don't stay awake for too long. ` | ||
|
||
await paste(importText) | ||
|
||
await click('#content') | ||
const editingText = await getEditingText() | ||
expect(editingText).toBe(`Don't stay awake for too long.`) | ||
}) | ||
|
||
it('when click the next thought, prev thought will be trimmed.', async () => { | ||
const importText = ` | ||
- Don't stay awake for too long. | ||
- I don't wanna fall asleep ` | ||
|
||
await paste(importText) | ||
|
||
await clickThought(`I don't wanna fall asleep`) | ||
await clickThought(`Don't stay awake for too long.`) | ||
const editingText = await getEditingText() | ||
expect(editingText).toBe(`Don't stay awake for too long.`) | ||
}) |