Comments (9)
@milesfrain I'd like to tackle generating test suite for Ch. 4.
from purescript-book.
I updated the original post with links to tasks for adding tests for to each chapter.
I think the easiest workflow is to just post in that chapter's issue to claim it (instead of my previously suggested workflow of creating a new issue).
from purescript-book.
Do I open a global issue for the three, or one for each?
Thanks for the report @othelarian. Up to you on whether you want to create just a single issue or multiple issues. You can also just jump straight to submitting a PR with a potential fix (even if there's more work to be done), and we can discuss it further in the PR comments.
from purescript-book.
@milesfrain, I would be honored to go through through your tests on chapter 6 in #78.
I'll also be glad to write some tests for the preceding chapters. And the subsequent ones as well.
I've always found tests to be one of the best ways to wrap your head around a problem. I agree with you that tests "would also be a great help in improving book quality for upcoming readers".
Thanks for thinking of me.
from purescript-book.
@p2327 Also offered to help with test writing. Let's make sure we organize who's working on which chapters so we don't duplicate efforts.
from purescript-book.
@milesfrain @p2327 Sounds good. I'm currently attempting to verify your test suite at each increment of the exercises in Ch. 6.
from purescript-book.
@oldfartdeveloper I just started chapter 6 so happy for you to work on it instead if you are already started! I'll share my repo anyway be good to check my work with yours im quite a newbie :)
@milesfrain happy to take on other chapters as needed?
from purescript-book.
@p2327 Interestingly, I decided to pause my study of the book after finishing chapter 6 to divert to contribute tests for chapter 3 because I am so convinced that @milesfrain's efforts on adding the regression tests is such a great idea for readers like you and me.
@milesfrain has already completed implementing the tests for his solutions for chapter 6, and his they were invaluable in helping me to process the material in the chapter.
At this point in time, I'm ready to start studying chapter 7.
In terms of adding tests for solutions, chapters 3, 4, and 6 are complete.
So, would you like to take a stab at supplying the tests for your solutions for chapter 5? You've just finished studying the chapter, and so you're in a perfect position to cement your hard-won knowledge by adding the tests, and you have testing examples for 3 chapters now.
This would free me up to tackle studying chapter 7, and I would now proceed by doing "test-first" development for the examples. When I'm finished, there would be tests and solutions for chapter 7.
I have solutions for all but one of the chapter 5 examples that I'd be glad to share if you wanted to compare approaches; I've discovered that there are frequently many ways to solve them.
I'm a newbie also, for me acquiring Purescript is not easy at all. But writing tests has made it easier.
So I'd like it if you took on implementing the tests for chapter 5; you're in a perfect position to do so.. Concurrently I'll implement the tests for chapter 7 as I study it.
Sound like a plan?
from purescript-book.
I detected multiple issues with the tests of ch12:
- edge case with the https://reqres.in if the user are behind a http-only proxy
- On Windows, the
countCharacters
test ended withRight 42
instead ofRight 41
, due to "\r\n" git auto conversion - On Windows (again), the
EOENT: no such file or directory
error can go with absolute path in some case, but the assert check on relative path
Do I open a global issue for the three, or one for each?
For people with this issues, here some ways to work around:
- For the edge case about proxy, install http-server globally (
npm i -g http-server
), launch withhttp-server -p 42524
in thetest/data
dir, and replace the url here (line 142) withhttp://localhost:42524/user.txt
- for the
Right 41
, change 41 to 42 - for EOENT error, two ideas:
- reuse what you learn to use
Path.resolve
to switch to absolute path, and concatenate the path you expected, tricky, but rewarding and interesting as we're here to learn ;-) - when you run the test with the solution (ie without any modification of the
test/Main.purs
file), the failed tests will show the expected returns for each EOENT, copy-paste everywhere it's necessary
- reuse what you learn to use
from purescript-book.
Related Issues (20)
- chapter8 chapter10 parcel package.json, index.html error
- spago build fails for chapter8-chapter11 HOT 2
- "Getting Started" directions don't work on OSX HOT 7
- [Ch3] Indentation docs for `where` are wrong HOT 1
- :memo: Chapter 8 standard form label use HOT 1
- Chapter 11 HOT 1
- chapter 10 duplicated mapSetFoo instead of alternative
- chapter 10 double negation intended or typo? HOT 2
- Chapter 9, final exercise description improvement HOT 1
- Error in Handbook - Asynchronous Effects
- Update Book to PureScript `0.15.0` HOT 2
- Chapter 10: Confusion between `id` and `identity` functions HOT 4
- Getting Started scripts - not all lines are removed
- error ERR_REQUIRE_ESM following instructions in Getting Started HOT 1
- Example from book fails on freebsd HOT 3
- [CH4] A more concise implementation of fibTailRec. HOT 1
- Warning about not using latest spago.
- Swap of Ch4 and Ch5 incomplete HOT 1
- Ch6: Subclass/Superclass confusion for `Ord`/`Eq`
- Not clear that Exercise should include subdirectories
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript-book.