question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make all tests consistent + support for Ramda placeholder

See original GitHub issue

Currently our support for ramda placeholder is limited. Almost all binary functions are lacking the support for it. We need to continually provide full support for it. Every binary function needs to have the following test in it’s test suite

  it('should support placeholder to specify "gaps"', function() {
    const trimStart = RA.trimStart(R.__);

    assert.strictEqual(trimStart('  abc'), 'abc');
  });

All other functions needs to have following curring test which tests the combination of params invocation:

  it('should curry', function() {
    assert.isTrue(RA.allEqualTo(1, [1, 1]));
    assert.isTrue(RA.allEqualTo(1)([1, 1]));
  });

As part of this, we should also refactor all tests to be consistent with gherkin style of testing. Here is an example PR which demonstrates what we want. I already invested tens of hours into this effort, but need help to rectify these things in the rest of our tests.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
js636fcommented, Jan 2, 2020

@char0n, thank you! I think I’ll close this issue first.

0reactions
char0ncommented, Apr 3, 2020

Closing this as we have last PR approved. @js636f great job here!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support placeholders and selectable-overloads #173 - GitHub
Make typings code base and tests more consistent and well structured; Ensure all functions are typed and tests; Allow to use/import ramda ......
Read more >
Ramda Documentation
A special placeholder value used to specify "gaps" within curried functions, allowing partial application of any combination of arguments, regardless of ...
Read more >
I Ramda - Partial Application with a Special Placeholder
Ramda has what they refer to as a Special Placeholder which is used to to partially apply arguments regardless of position. To use...
Read more >
chore: ramda-adjunct v2.10.0 release | by Vladimír Gorej
When we started with the ramda-adjunct, we tried to mimic practices used in ramda tests. We found out some time after that mimicking...
Read more >
Ramda: how curry pass the arguments to placeholders
The placeholder at the end of the definition of f doesn't do anything. It's not really sensible there. So that is really just...
Read more >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found