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

Guide on creating or translating a kata in JavaScript #214

Closed
hobovsky opened this issue Dec 30, 2020 · 5 comments · Fixed by #212
Closed

Guide on creating or translating a kata in JavaScript #214

hobovsky opened this issue Dec 30, 2020 · 5 comments · Fixed by #212
Assignees
Labels
documentation Improvements or additions to documentation kind/tutorial New Tutorial language/javascript Articles related to JavaScript

Comments

@hobovsky
Copy link
Contributor

Something similar to #191

This thread would be used for discussions, ideas, and suggestions which would not fit into PR reviews.

@hobovsky hobovsky linked a pull request Dec 30, 2020 that will close this issue
@hobovsky hobovsky added documentation Improvements or additions to documentation language/javascript Articles related to JavaScript labels Dec 30, 2020
@Steffan153 Steffan153 added the kind/tutorial New Tutorial label Dec 30, 2020
@hobovsky
Copy link
Contributor Author

I wonder if it would be worth to mention amount of JS runtimes and the fact that the newest one should always be preferred. Authors should make sure that Node 12 (?) is available, and not struggle for compatibility with Node 8.

@Steffan153
Copy link
Contributor

Node 8 will be removed at some point anyways.

@kazk
Copy link
Member

kazk commented Dec 30, 2020

Yeah, any new kata or translation should use the latest version. Compatibility with older version is not needed.

@hobovsky
Copy link
Contributor Author

In Tests section, I think the parts on organization (Mocha ) and assertions (Chai) are not sufficiently separated. My suggestion would be to organize it in a way similar to:

  • Tests
    • Assertions library: Chai
      Abridged reference of most commonly used chai assertions...
    • Testing framework: Mocha
      • Test grouping functions
      • Dynamically generated test cases (after describe and it are presented, not before)
    • Test feedback (CW specific, so not in Chai and not in Mocha part)
    • Generating random numbers
    • ...

I am also not sure if it would not be better to swap parts on Chai and Mocha, but we can check it after we got these two separated.

@XRFXLP
Copy link

XRFXLP commented Jan 6, 2021

Suggestion:

Freeze the Object which are being as method for validation for solutions:
(For example: Math, Array, Function, String....)
For example there are many katas in which validation process uses String.prototype.split, but the translators or author usually forget to freeze or constantify the handler function, which led user to modify the prototype itself to pass the tests.

And I think this is not detected my anti-cheat system, because I've recently seen couple of such solution for few 1 kyu katas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation kind/tutorial New Tutorial language/javascript Articles related to JavaScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants