-
Notifications
You must be signed in to change notification settings - Fork 220
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
Recent Changes 2018-12-xx #1647
Comments
Is it possible to make mocha not polluting the global space with all its test methods? Dropping tons of functions into global scope is problematic because they can easily collide with user defined variables, as well as providing extra vectors of vulnerabilities (e.g it's still possible to call test assertion methods in user code). Basically, I think sticking to It looks possible, but apparently it's only available when the JS file is run via mocha binary. Looking further into this kinda makes me want to drop mocha altogether and use something better-designed and which the devs are more open-minded to users and not just straight out declaring users "unhelpful" and their requests "stupid". Then it'd be much easier to maintain and get support in the future. Or, at least, wrap mocha into a module that exports all its functions into a namespace, and then import that module? |
We can consider other test frameworks later when Codewars can handle multiple test frameworks per language. Reasons to use Mocha are:
If I'm understanding correctly, that "Using Mocha programmatically" wiki page is basically showing how to replace the
I don't think it can be done easily. I'd assume someone would have done it already if it's possible. |
I just checked some basic stuff in the preview site, about comments markdown:
see below: |
Thanks for testing @Blind4Basics.
This seems unrelated and happens when writing new comments and not editing existing :/
This looks like a CSS issue. Some rule with higher specificity is making it smaller. I haven't touched the frontend yet and not looking forward to. The markdown preview and the actual doesn't always match because two different engines are used (#1640). But I think it should be closer compared to before because the server side engine also follows Common Mark now. I'll see if I can make the preview match the actual by adding some options. The server side one is not as configurable. |
Some katas (for example this one ) might have descriptions and/or discourse sections messed up because they use |
Something is wrong with how comments are shown in different places. The upper part is how the comment looks on the dashboard, and the lower part is how it looks in the kata discourse. I assume the user messed the comment markdown while writing his comment, but I'm sure I haven't seen anything like this before the update. |
@FArekkusu is that from preview? I reverted the update because of some weird errors and haven't re-deployed yet. So if you saw that on production version then it wasn't introduced by the update. The dashboard comments can be outdated because it's cached heavily. It looks like the edits were not reflected when you saw it. Looks like the preview is showing comments from a day ago as newest for some reason. It was always less up to date compared to the production one but it looks like it's been stuck. I might not work on this during holidays but I'll be back on Wednesday. |
@kazk no it was not from preview version. Must be a bug with the current comment system. |
I'm going to start announcing Codewars changes, using issues for now. I'll close this when I post a new one.
Feel free to post comments here if you have any questions about the changes.
Code Runner
New Languages
Please try/translate them and let me know if you find issues.
New Language Versions
I've decided to drop the custom test framework cw-2.js and use Mocha under the hood.
Assertion methods with the same name are still provided to make the transition smooth. They're just wrappers around Chai.
You can use Chai directly for better assertion methods and use fast-check for property based testing.
Existing contents should be compatible as long as the tests are written using
describe
/it
. There's no change to Node 6/8 so incompatible ones can continue to use older versions of Node for now.When this is released, I'll run a script and update compatible ones to use Node 10. Then create a list of incompatible ones similar to what we did when switching to the new runner.
Codewars
The text was updated successfully, but these errors were encountered: