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

Issue in: Code quality > Automated testing with Mocha > beforeafter.view > test.js #1866

Closed
tmollov opened this issue Apr 16, 2020 · 2 comments

Comments

@tmollov
Copy link
Contributor

tmollov commented Apr 16, 2020

Hi, people

Here in "Automated testing with Mocha":

https://github.com/javascript-tutorial/en.javascript.info/tree/master/1-js/03-code-quality/05-testing-mocha/beforeafter.view

opened html locally causes error:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

this is because default timeout for tests in mocha is 2000ms
and if user doesn't respond to the alert box in time, all tests fails:
some time just in before hook, sometimes in beforeEach and so on.
I will add this.timeout(200000) to bulgarian translations to prevent it.
Like this:
describe("test", function () {
this.timeout(200000);
....
});

tmollov added a commit to javascript-tutorial/bg.javascript.info that referenced this issue Apr 16, 2020
Fixed:
- misspellings
- Added additional info and code about issue 1866
javascript-tutorial/en.javascript.info#1866
@iliakan
Copy link
Member

iliakan commented May 18, 2020

Send a PR here?

tmollov added a commit to tmollov/en.javascript.info that referenced this issue May 31, 2020
iliakan added a commit that referenced this issue Jun 1, 2020
@iliakan
Copy link
Member

iliakan commented Jun 1, 2020

Thanks, merged!

@iliakan iliakan closed this as completed Jun 1, 2020
tarasyyyk added a commit to javascript-tutorial/uk.javascript.info that referenced this issue Jun 8, 2020
* google js guide link

* Fix for Issue #1866

javascript-tutorial/en.javascript.info#1866

* fixes #1935

* fixes #1931

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* typo

* remove a stray 's' that caused an error in ball drag example

* closes #1949

Co-authored-by: Tiago Castro <tiago.070@gmail.com>
Co-authored-by: Tundzhay Mollov <tmollov@users.noreply.github.com>
Co-authored-by: Ilya Kantor <iliakan@gmail.com>
Co-authored-by: Ilya Kantor <iliakan@users.noreply.github.com>
Co-authored-by: nicholas hung <nhung93@outlook.com>
Co-authored-by: tarasyyyk <oster.ok@gmail.com>
aritram1 added a commit to aritram1/en.javascript.info that referenced this issue Aug 25, 2020
* correct minor error

* correct minor error: "имя" is used in place of "name"

* Remove duplicate word "soon"

* Fixed a comment, to reflect changes in the task.

The task has a test with a missing comma.  That same comma is missing in the comment, so I'm putting it here as well.

* Fixed minor typos

The empty users array was undeclared in the second test, and the object in the first test was missing a comma in its declaration.

* fixed grammar

* Fix typo

* Details on cross-origin requests & credentials

Cross-origin requests initiated by embedded images and forms actually bring cookies by default. Though it is incorrect to say that all cross-origin requests do not bring credentials by default.

* fixed typos

* minor fixes

* minor fixes

* minor

* google js guide link

* Update article.md

* minor fixes

* Fix for Issue javascript-tutorial#1866

javascript-tutorial#1866

* fixes javascript-tutorial#1935

* fixes javascript-tutorial#1931

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* typo

* fixed wrong formatting

* Grammar fix: Missing "is" in websocket EN article

The english websocket article was missing an "in". I fixed it for you. :)

* Add test cases for 1-js/06-advanced-functions/03-closure/9-sort-by-field

Just a simple check to see if the code works on the example given in the task.

* remove a stray 's' that caused an error in ball drag example

* Grammar and typo fix in pointer events

* Match the solution with the question on task.md

On task.md, " -9  " has 2 white spaces before "-9".

* Update phrasing on "Comparison with ||"

The phrase `zero becames 100.` make me think that there is a variable `zero` defined when there is not.

* closes javascript-tutorial#1949

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* Add test case/sandbox for 1-js/06-advanced-functions/06-function-object/5-sum-many-brackets

I used the solution and examples already in the article.
I chose to make the test cases use Array.reduce() to compute the sum,
instead of hard-coding the answer myself.
Not sure how good of practice that is.

* Got rid of excessive newlines in task/sum-many-brackets sandbox code.

* Add bottom and right properties for getCoords()

The `createMessageUnder()` function below needs the `bottom` coordinate, but it doesn't in the result of `getCoords()`.

* Fixed Wikipedia link and list markdown

* minor fixes

* minor fixes

* Fixed onupgradeneeded handling

`openRequest.result.version` in `onupgradeneeded` is not the current DB version. It is the requested version, equal to `event.newVersion`. `event.oldVersion` contains the current version.

* Made the test cases easier to read.

* Set fake timers after calling throttle

Calling throttle before setting the fake timers will break any implementations that save a timestamp outside the wrapper function.

* Fix typo 

followed -> followed by

* Correct misspelling retarteted -> retargeted

Fixes javascript-tutorial#1966

* 'since this moment' -> 'from this point forward'

* 'where finds it and changes' -> 'where it finds and changes it'

Was tempted to suggest something a bit wordier: "where it finds it and, in this case, changes it", but I thought this would do.

* minor fixes

* minor fixes

* Update article.md

Fixing a typo

* Fix typo

without -> with

* minor fixes

* minor fixes

* Update article.md

minor type fixes

* Update article.md

minor typo fix

* minor fixes

* Fix typo in /instanceof section (widow -> Window)

* update solution.md

There are some missing "=" sign according to the question.

* Typos

2 small fixes

* Typos

* Update article.md

* Fix minor typo error: delete blank

* fixes javascript-tutorial#1979

* is 'if' operator?

The title makes me ask "is 'if' keyword operator or not?".
I think 'if' is not operator because it does not return any value and it is called if-statement.

* Corrected a typo

* minor fixes

* minor fixes

* Type mistake

Used "unitialized" instead of "uninitialized"

* Fixed Type

* more definitive title

There are also array literals and string literals.

* minor fixes

* minor fixes

* Update article.md

Minor edit around example code: " should be around id

* Fix error of BigInt

* Correct message in sandbox.view iframe

* Update task.md

* Fix a comment

* 8.4  Prototype methods... - Fix code typo

Move comma before square bracket
Object.create(proto[, descriptors])

* Update article.md

* minor fix: precedence is 5 according to MDN

* Change equality sign `=` to equality sign `==`

* Fix some confusing expression

* minor fixes

* Update article.md

Revision to unary plus not allowed bigints description in response to PR

* Update bindAll of lodash

* Browser LocalStorage capacity updated to 5 MB.

* Fix minor typo error: ol number

* Fix minor typo error: add ol number

* Fix minor typo error: change when when to when

* Update article.md

* Update article.md

* Update index.html

* to make binding more clear

understanding "pre-bound value"  can be little bit hard.

* grammatical fix

* grammar fix

* Typo

Thanks for a great tutorial!

* refactoring

more readable and more modern way

* Update article.md

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* repeated word

* Typos

* Various minor syntax and punctuation changes

* One more little phrasing change

* minor fixes

* minor fixes

* minor fixes

* minor fixes

* Update article.md

Changes proposes for the [issue 2049](javascript-tutorial#2049)

* Update article.md

* [Typo Correction] - "fetch" solution typo error

fixed typo - "arrray" to "array"

* minor fixes

* minor fixes

* delete unused line

* Remove Edge and Firefox warning

Supported in Edge 79 and Firefox 78

* Update task.md

* Update task.md

* Date object explained clearly

* Update solution.md

* Update solution.md

Co-authored-by: Zhi Yin <z.yin.md@gmail.com>
Co-authored-by: Dmytro Hrynchyi <desevoker@gmail.com>
Co-authored-by: Logan-Schelly <56139290+Logan-Schelly@users.noreply.github.com>
Co-authored-by: Antony ekirapa <antony.ekirapa@gmail.com>
Co-authored-by: Ilya Kantor <iliakan@users.noreply.github.com>
Co-authored-by: GabrieleC <coletta.gabriele@gmail.com>
Co-authored-by: Temirzhan Yussupov <timka2609@gmail.com>
Co-authored-by: Kumar Vaibhav <wave.vaibhav@gmail.com>
Co-authored-by: Ilya Kantor <iliakan@gmail.com>
Co-authored-by: Tiago Castro <tiago.070@gmail.com>
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
Co-authored-by: Tundzhay Mollov <tmollov@users.noreply.github.com>
Co-authored-by: Gabriele Coletta <gdmg92@gmail.com>
Co-authored-by: Michael Born <8106227+michaelborn@users.noreply.github.com>
Co-authored-by: Logan Schelly <idyllogan@verizon.net>
Co-authored-by: nicholas hung <nhung93@outlook.com>
Co-authored-by: Dharohar Rathore <rathoredharohar@gmail.com>
Co-authored-by: Diego Torres <diegotc86@gmail.com>
Co-authored-by: 华晨 <chanjsq@gmail.com>
Co-authored-by: LuiGee3471 <yjs3475@gmail.com>
Co-authored-by: xehpuk <xehpuk.dev@gmail.com>
Co-authored-by: aadijoshi <aadijoshi@hotmail.com>
Co-authored-by: Rizky <41568558+rizkyzhang@users.noreply.github.com>
Co-authored-by: Joachim Klug <github@joachimklug.com>
Co-authored-by: Peter Roche <46547072+paroche@users.noreply.github.com>
Co-authored-by: Roman Romanenko <rromanenko@users.noreply.github.com>
Co-authored-by: Dmitriy Davydov <dvdvdmt@gmail.com>
Co-authored-by: Akshay Mittal <aky.mtl@gmail.com>
Co-authored-by: traxium <crayfishexterminator@gmail.com>
Co-authored-by: DanGhanbari <40830705+DanGhanbari@users.noreply.github.com>
Co-authored-by: peachesontour <67612358+peachesontour@users.noreply.github.com>
Co-authored-by: 刘二男 <liujiaweidreamer@gmail.com>
Co-authored-by: LeviDing <imdingxuewen@gmail.com>
Co-authored-by: Mustafa Kemal Tuna <12192118+lumosmind@users.noreply.github.com>
Co-authored-by: Dratzidis Athanasios <realsaki@hotmail.gr>
Co-authored-by: Pushpender <46690325+pushpend3r@users.noreply.github.com>
Co-authored-by: Siddharth Golchha <sidrocks1@gmail.com>
Co-authored-by: Shubham Maurya <shubhammaurya@gmail.com>
Co-authored-by: Sergei Makhlonov <38110833+smakhl@users.noreply.github.com>
Co-authored-by: Chao Zhang <czhang@axonify.com>
Co-authored-by: Dalibor Pasalic <pinciboy@hotmail.com>
Co-authored-by: Nguyễn Đức Hào <39975444+haond10adp@users.noreply.github.com>
Co-authored-by: Mazhar Zandsalimi <m47h4r@gmail.com>
Co-authored-by: Pankaj Tanwar <2016ucp1381@mnit.ac.in>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: Maksumi Murakami <maksumimurakami@gmail.com>
Co-authored-by: Chan-Min, Kim <kimchanmin1@gmail.com>
Co-authored-by: Violet Bora Lee <learnerbr@gmail.com>
Co-authored-by: josephrocca <1167575+josephrocca@users.noreply.github.com>
Co-authored-by: AasthaSinha2305 <55781193+AasthaSinha2305@users.noreply.github.com>
Co-authored-by: Aastha Sinha <asthasinha2305@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants