TryKickoff / kickoff

:basketball: A lightweight front-end framework for creating scalable, responsive sites. Version 8 has just been released!
http://trykickoff.com
MIT License
463 stars 59 forks source link

Adding a JS Test Framework to Kickoff #52

Closed ashleynolan closed 8 years ago

ashleynolan commented 9 years ago

It’s long been a goal to integrate some kind of JS test framework into Kickoff.

Obviously, this could be quite rocky ground, as there are lots of different options out there and I think this will be where the generator will definitely come in handy for including/excluding testing from potential setups.

If we do implement this, should it be as a feature branch – like the Browserify setup – that we then only include as an option in the generator. Or should this be something we build into the master of Kickoff?

Thoughts please @mrmartineau, @munkychop and @nicbell :)

nicbell commented 9 years ago

I like Mocha but is I use tend to used Kickoff as SASS framework only.

munkychop commented 9 years ago

IMO it seems like there isn't really anything to test, as the generated JS is pretty skeletal, so it seems a bit overkill to add a test framework.

ashleynolan commented 9 years ago

@munkychop it’s more so that when people add their own modules, they don’t have to set anything up testing-wise, as the grunt structure is already in place.

munkychop commented 9 years ago

@ashleynolan in that case Mocha would be my first choice, but I do agree with @nicbell that most people will be using Kickoff for the SASS side of things. I suppose adding a test framework is a nice way to stick to good practice, though, so may be worth adding in for that reason alone.

ashleynolan commented 9 years ago

Ok – I think for me it’s about encouraging devs – whatever level – to adhere to best-practice when using the tools that Kickoff provides.

Testing has become a defacto now for JavaScript, but I think the barrier to entry is having the time to set it up and then write the tests. If Kickoff can help with the setup side of things at least, hopefully it can help devs – much like the Browserify setup aims to help people get started with the setup side of that and just start writing CommonJS modules.

I have a base setup for Mocha already, so may look at doing that as a feature branch at first and then if we want to merge it in at some point, then the option will be there later.

munkychop commented 9 years ago

Sounds good, although the barrier to entry is already fairly high (for noobs) in terms of running the generator vs a simple clone. I do agree that people should be guided in the direction of best practice, so for me it's worth doing purely from that perspective, although I think said guidance may be lost on people who already use the generator.

nicbell commented 9 years ago

It really depends on what the purpose of Kickoff is. I mostly see it as a SASS framework, I tend to download Kickoff and delete a lot of stuff.

The rest of my workflow is dictated but the type of project I'm working on. Am I doing a separate front-end then integrating or am I coding straight into .net/php? Do I already have a local server? Is it angular? What testing frameworks do I need to hook into? Are there CI tasks?

mrmartineau commented 9 years ago

@nicbell you raise an interesting point. Should we make it easy for devs to just pull the scss part of the framework? This could simply be an additional question in the generator that only copies the scss folder.. what do you think?

ashleynolan commented 9 years ago

If people are only going to use the SCSS, surely they’d just have a fork of Kickoff and do a copy/paste job?

Open to what others think on this though if we think it would genuinely be of use to those using the generator.

tommaton commented 9 years ago

Me personally I've used Kickoff in multiple CMS's and frameworks (CQ5, AEM, Sitecore, Umbraco, ReactJS, AngualrJS, Assemble) of which some (even the CMS) have a js testing framework already built in and therefore wouldn't require a testing framework.

So to have the generator add a js test framework via a question would be my preference.

mrmartineau commented 9 years ago

Thanks @tommaton, this feature sounds like a generator question in my opinion..

ashleynolan commented 9 years ago

Cool – sounds like it should definitely only be a feature branch and then included in the generator then.

Thanks for all your opinions :)

mrmartineau commented 9 years ago

@ashleynolan do you want to take charge of this then?? :wink:

ashleynolan commented 9 years ago

Yeh, thought that was implied ;)

I’ll assign to myself as a task to do at some point.