Tests for Zipper are far from sufficient
See original GitHub issueReference: https://exercism.io/mentor/solutions/962ebabf19e848e5bceed0533f1898ad#discussion-post-605355
We should add a test similar to:
test('traversal returns a new Zipper object', () => {
expect(zipper.value()).toEqual(1);
let left = zipper.left();
expect(zipper.value()).toEqual(1);
expect(left.value()).toEqual(2);
})
This seems to be a pretty key thing to not test for.
I don’t actually think the students exact implementation is super critical here. What they did was implement a single object with a “cursor” that kept track of where it was in the tree and acted accordingly. So that calling left
or right
would merely update the cursor position…
Which 100% works since the current tests never require that a new object be generated.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Standard Test Methods for - Strength Tests for Zippers1
9.1 These test methods cover the determination of the strengths of zipper chains and elements in tensile tests. 9.2 The element pull-off and ......
Read more >Methods For Evaluating The Physical Performance Of Zippers
The physical performance of zippers can be measured and determined in various ways, dependent upon the types of zippers and the desired ...
Read more >The "Zipper Test" Shoulder Flexibilty Assessment Demonstration
The " Zipper Test " Shoulder Flexibilty Assessment Demonstration. 17K views 10 years ago. karisabin05. karisabin05. 64 subscribers. Subscribe.
Read more >Testing Methods / YKK FASTENING PRODUCTS GROUP
Zipper Testing Methods. There are various methods by which to evaluate zipper strength. The basic strength can be determined based on the results...
Read more >Zipper Reciprocating Tester - QINSUN
Zipper reciprocating tester is used to measure the zipper performance of products with zippers, such as clothes, textiles, auxiliary materials, bags, shoes, etc ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh I forgot we had those sample solutions. 😃
Oh, setting is suppose to make new zippers too? Yeah, even my own solution is doing this way wrong… starting to sound like a uber functional exercise. 😃
When I hear pointer I think of the object property, not the object itself… Ie
Zipper#focusNode
is the pointer, since it’s literally pointing at the node… but I see how you’d come to think of the higher level object as doing the same thing, despite it really just holding the pointer.It doesn’t. But for now this is all we can do, because I want to keep following the
problem-specifications
readme format. I don’t want to have to keep track “which exercises have a special readme” as often we mass re-generate all the readme’s.In
v3
this is fixed! So it’s only a concern for now anyway. 😃