generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: test postponed task and date creation (#2473)
* test: - test createPostponedTask() * test: - test TasksDate.postpone() * test: . extract postponedDate variable * test: . test TaskDate object to use the formatAsDate() method * test: - fix test data to reflect the test meaning * test: . extract expectedPostponedDate variable * test: - add expectedDateField parameter to the helper * test: . reorder helper's parameters for readability * test: . inline variable * test: - use the helper function in other tests * test: add failing test for postponing tasks with inferred scheduled dates * test: . Extract variables for constants in one test Preparing to extract a helper function * test: . Extract helper function checkDatePostponesTo() * test: . Inline constants to make test behaviour clearer * test: - Adjust tests to use helper function * test: Confirm that advancing by 1 month works with shorter months * test: Add some TODOs for future tests * test: Show that postponing overdue tasks by > 1 day is unhelpful now. * test: Add a test to visualise postponing by 1 week * test: . Extract helper function postponeMultipleDatesBy() * test: . Inline 'amount' and 'unitOfTime'; rename 'output' to indicate intent * test: Fix the test name * test: Visualise postponing by 1 day * test: Move TODO to where needed * test: Add failing test for postponing future date changing stored date * test: - Extract function checkPostponingDoesNotModifyOriginalDate() * test: . Inline variables * test: Better coverage for checking postpone() does not modify date --------- Co-authored-by: Clare Macrae <[email protected]>
- Loading branch information
1 parent
f952634
commit 27f93ca
Showing
2 changed files
with
210 additions
and
2 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
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