21 Commits

Author SHA1 Message Date
657721adc6 Update dart-git and stop using the Result class
Instead we're going to move back to standard exceptions.

Using a custom Result class has created far far more problems
- The Stacktraces aren't always right
- Sometimes one forgets to check the Result error
- All other exception throwing code needing to be converted to Results
- Non idiomatic Dart code

I think it's better to just go back to exceptions. They have their
problems, but overall, I think it's a better approach.
2023-11-24 14:03:30 +01:00
92e73c414d Move core Note classes into a separate file
I'm trying to get ride of this huge 'Note' class, and have it be quite
dumb. The idea is that we'll have separate Note subclasses - TxtNote,
MdNote, etc
2022-04-24 13:09:14 +02:00
3329a7f71f Repository Test: Split out testing setup code
This is useful for other tests as well
2022-02-24 13:29:47 +01:00
6237161a28 Enable logging in tests
It makes it easier to diagnose issues on the CI
2022-02-20 01:24:07 +05:30
afd7690611 Use fast_immutable_collections instead of Kt
It's much more intuitive to use, and is way more performant.
2022-01-27 12:13:34 +01:00
3841cdcab9 Note.tags: Use an compile time immutable set 2022-01-27 11:52:43 +01:00
e27bfbfaea Repository.moveFolder: Add more tests 2022-01-26 12:01:47 +01:00
c9a031dd29 moveNote: Add test + fix
Fixes #590
2022-01-26 12:01:47 +01:00
69db114fe8 RepositoryTest: Move setup code into a library
I want to write lots and lots more higher level integration tests. This
is the first step
2022-01-26 12:01:47 +01:00
30a6beab73 Note.created: Make sure it stays the same
It was being updated
2022-01-25 11:04:04 +01:00
1829f69f5e Repository: Add a test to ensure that outside changes are detected
This seems to work perfectly.
2022-01-22 16:07:44 +01:00
a6291b85a1 Repository: Hide logs by default 2022-01-22 10:21:18 +01:00
684a065aba Fix test 2022-01-21 21:59:04 +01:00
2e2e371c25 Repository.addNote: Allow it to fail 2022-01-21 21:54:38 +01:00
da5346e0f4 Repository.updateNote: Handle failures
We were silently ignoring them before.
2022-01-21 21:44:01 +01:00
f5ef08fd09 Repository.rename: Fail if the destination exists 2022-01-21 21:29:11 +01:00
646a19b765 Repository: Allow multiple tests to exist in the same file 2022-01-21 20:59:20 +01:00
9251353118 Repository.test: Avoid calling sync + cache in the test
It's not required and makes things harder to debug.
2022-01-21 17:21:15 +01:00
4b195d3e8c Repository.rename: Add another test
Sadly, I cannot seem to run both tests from a single test file as they
seem to conflict with each other, even though they are starting from a
fresh state.

I don't quite understand why.
2022-01-21 17:10:14 +01:00
6a9719638c Repository.rename: Improve the test 2022-01-21 16:53:21 +01:00
abbfbba961 Add a high level test for renaming a Note
Now that GitJournal is following a redux style, writing tests for the
domain logic is much easier.
2022-01-21 16:27:48 +01:00