testdouble / teenytest

A very simple, zero-config test runner for Node.js
MIT License
96 stars 14 forks source link

make the code user friendly? #23

Closed ghost closed 8 years ago

ghost commented 8 years ago

Cool stuff bro! And fast!!! But what scares me to hell is the tons of extra code you need to add to due a simple test! What about making it user friendly bro?

logger-factory.js. Can't this be baked into the source? Let the asserts be a simple plugin that include assert.js. And plugin options for other to create their own assert library if needed?

I think bro all this things scare people off. I guess your intention is that end-devs - not nerds - should use your absolutly great code?

What about debugging bro?

Other cool stuff to consider...

Damn cool bro if I cun only run the test directly without extra code!!!

And cool cool stuff bro! I'm loving it!!

searls commented 8 years ago

Thanks for the lighthearted stream of consciousness appraisal, Jon. I'll try to pick out a few parts to respond to next time I'm at my computer.

ghost commented 8 years ago

Hi again bro! Yeah nice if you could make a few changes! I just noticed that your index.js file in the root is suspiciously similar to the code inside test/helper folder.
So my suggestion is that bro if you give your superb code a brain so it become super smart, and can do all this crazy stuff out of sight for everyone. This code will be a winner!!

ghost commented 8 years ago

Here bro is a few more suggestions!!

When you run tests today, you are invoking the test/helper function. Isn't the tennytest that is the engine here, and not the helper?

So my idea is that you replace helper.run('test/fixtures/basic-*.js', function (er, result, log) {} with teenytest('test/fixtures/basic-*.js', function (er, result, log) {}

So then bro teenytest need a little change so it's second argument is either userOptions or nothing. Nothing sounds bad :( So if you have a default object with default settings, you could merge that with options by user.

var defaultOptions = { ... } var userOptions = { ... }

So if you run teenytest without options, it will fallback to defaultOptions by default.

Then me - as end-dev - only need to run teenytest, and I know it will have 3 arguments. At least this make my life much easier :) What do you think, bro?

I also saw this // 3. run the tests in the index.js file. Here you could add a reporter plugin. And by default in mentioned defaultOptions you could have

js var defaultOptions = { reporter: }

I just see this from a user perspective bro. I'm not so good at the internal stuff!!!

ghost commented 8 years ago

Hi dude! Sorry but I had a rough weekend with the bottles again :( :( At least I managed to read through your code, and other issues, and have a few more things to mention bro!

Sorry bro! My brain is fucked up. Love yeah and your awsome code! !

ghost commented 8 years ago

Bro!! Look at this 5 year old mocha code. 5 year!! https://github.com/mochajs/mocha/tree/a4248603b4867171c85123dc1ed94b59392e856a/lib

It is user friendly, have reporters; option for excluding files and emitter.

Nice stuff bro!!

What's killing me bro is your silence and your callback in the test helper folder. It can be in line. Done in test-doubles too bro! And mocha!!

I'm little drunk. Sorry for that bro. Love yeah! !

ghost commented 8 years ago

Hey bro! I scrap this project now. The author seems to be out of radio range or switched off and the repo seems to be pretty dead the last 32 days. Still awsome code bro!

searls commented 8 years ago

There are a lot of disparate issues raised in this thread. I'll try to enumerate them here and either address them or create new issues focused on one thing at a time.

Locking this thread because it covers too many topics to have a productive, focused conversation. If you want to raise any of these specific points elsewhere, feel free to open an issue with a linked example project to demonstrate the issue or send a PR.