Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding lots of new tests for the tutorial and solution #64

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

Nickname5862
Copy link
Collaborator

@Nickname5862 Nickname5862 commented Sep 26, 2024

Lots of new tests have been added to the tutorial part of Sherlock. These include:

  • Swapped 7 - advanced with 8 - util to be able to use advanced techniques in the utils.
  • More tests, including reactor options order of execution (3), fallback-to (5), errors (6), templates, take, map on arrays, mapState, flatMap, states, pluck (7), and pairwise/scan on normal arrays, peek, lift, final, promise, fromObservable, fromEventPattern... (8).
  • Added a solution for the bonus exercise in (9) which previously lacked a solution.
  • The tutorial and solutions are now both available in the same branch. To prevent making every change twice, all changes should now be put in the generator folder rather than directly in the tutorial or solution folder.
    • Also, a generateTutorialAndSolution file has created to automatically transform the files in the generator folder to the tutorial and solution files in the tutorial and solution folders. This way, a single change has to be made in the generator files which is immediately propagated to changes in the tutorial and solution files when using the command npm run generate.

TODO: new things can still be added to the tutorial, such as:

  • Lenses (didn't sound too interesting though)
  • Cyclic Reactors (preventing, when two atoms are dependent on each other, that infinite cyclic behavior occurs. Unsure whether we currently prevent cyclic behavior or allow it until a maximum depth)
  • Transactions (the atomic() function - allowing multiple atoms to be changed simultaneously without triggering a derive or react update in-between)

TODO: also check how you can make sure that this Semantic PRs automatically makes a changelog for me.

But that's for another KipSate!

untio11 and others added 29 commits November 7, 2023 19:51
Additionally fixed the broken imports of sherlock and sherlock-utils
Use npm run tutorial to run all the test cases in the tutorial directory.
Note that it's currently skipping the test cases.
They have been validated to run (and fail) before
committing though.
Again skipping by default.
There's still one part at line 121 where I'm not sure what's happening
As always, set to skip by default.
Some weird config/import spaghetti was going on. Now everything works
with the '@' import notation.

Co-authored-by: Paco van der Linden <[email protected]>
Currently skipped as always.

Also removed some unused pieces of code:
- Imports
- Outer test suite that didn't do anything useful
Still have to iron out some details probably
Probably have to tweak it a bit more though
This way it doesn't count as a failed test case when running
npm run tutorial.
Also updated a comment in tutorial 1 slightly.
@Nickname5862 Nickname5862 marked this pull request as draft September 26, 2024 12:06
@Nickname5862 Nickname5862 self-assigned this Sep 26, 2024
@Nickname5862 Nickname5862 changed the title Expansion feat: adding lots of new tests for the tutorial and solution Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants