mocha-examples icon indicating copy to clipboard operation
mocha-examples copied to clipboard

Suggestions for the future

Open craigtaub opened this issue 6 years ago • 12 comments

Leave a comment if you have a request or suggestion for a configuration you think would be useful.

See https://github.com/mochajs/mocha-examples#potential-setups-to-add-in-future for examples.

craigtaub avatar Apr 06 '19 16:04 craigtaub

Think i'll start this with one which gets requests alot.

  • Pass user defined values from a test to a Reporter (via env vars)

craigtaub avatar Apr 06 '19 16:04 craigtaub

Rest API is definitely one we need.

craigtaub avatar Jun 20 '19 09:06 craigtaub

.mocharc.ts

lookfirst avatar Sep 22 '19 06:09 lookfirst

vue -webpack

wnghdcjfe avatar Sep 24 '19 14:09 wnghdcjfe

@craigtaub

Hi, I'd like to suggest react-hooks-example as a new feature. There are a lot of React projects made using hooks, and I don't think we can easily find a way to write test codes for them. Let me know what you think.

leehwarang avatar Sep 28 '19 16:09 leehwarang

@leehwarang this might be more a question around "how to use Hooks" rather than "how to use Mocha". Their recipes are pretty good.

But saying that I like the idea. Just feel a new app is overkill (as we already have the react example). Perhaps lets add it there.

craigtaub avatar Sep 29 '19 11:09 craigtaub

Hi @craigtaub I'd like to suggest Typescript and Babel combination. I saw this one listed at Potential setups to add in future. I think Typescript and Babel examples are pretty good. So I would like to combine them. Let me know if it's okay for me to start this project. :)

seohyun0120 avatar Sep 29 '19 12:09 seohyun0120

@seohyun0120 Feel free to give it a go and pls try to follow similar architecture/practices as the babel example. Thanks so much we really appreciate any help we can get with these.

craigtaub avatar Oct 04 '19 12:10 craigtaub

I think puppeteer example is needed

wnghdcjfe avatar Oct 20 '19 02:10 wnghdcjfe

@craigtaub I created PR #27 about async setup with --delay. I'll wait for your review. :)

HyunSangHan avatar Mar 04 '20 13:03 HyunSangHan

@dschinkel we have examples on react/webpack/typescript/babel etc have you seen/tried them?

craigtaub avatar Aug 18 '20 09:08 craigtaub

Hi @dschinkel

I think you should consider the tone you are using towards people who spend their valuable spare time on maintaining a piece of central infrastructure you clearly rely on.

The problem with your setup is that typescript/tsx code is actually quite hard to just run out of the box in node. Notice how I don't mention mocha in this sentence. You need to get your stuff to work in node, and then mocha will work. I do agree that we are missing an example of a setup that resembles yours, but to be honest my interest in spending time on your case just diminished quite a bit by witnessing your assumed priviledge.

How about you meet us half way and start actually giving some constructive feedback on the missing setup, for example by starting a PR with an example setup, even one showing errors. Then we have an actual test case we can work on fixing

Munter avatar Aug 18 '20 15:08 Munter