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

Add strain exercise #239

Merged
merged 3 commits into from
Jan 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exercises/practice/strain/strain.coffee
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the tests are not synchronized with this change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify please? I don't see any unsynced tests.

./bin/configlet sync --tests -e strain
Updating cached 'problem-specifications' data...
Checking exercises...
The `strain` exercise has up-to-date tests!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initial code:

class Strain
  @keep: (lst, predicate) -> 

  @discard: (lst, predicate) ->

module.exports = Strain

produces the following error:
TypeError: strain.keep is not a function

Removing the @ makes the tests pass (when solution is implemented).

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Strain
keep: (lst, predicate) ->
@keep: (lst, predicate) ->

discard: (lst, predicate) ->
@discard: (lst, predicate) ->

module.exports = Strain