Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.

Consider re-introducing test #159

Closed
drublic opened this issue Jan 22, 2013 · 11 comments
Closed

Consider re-introducing test #159

drublic opened this issue Jan 22, 2013 · 11 comments

Comments

@drublic
Copy link
Member

drublic commented Jan 22, 2013

In 4989cf9 tests were removed from the repo. I want to suggest to re-introduce them in a lightweight form for helper.js since there is a lot of functionality.
I think it is important to have some tests for the functions we write. Also it might help people get started with tests on their projects.
Keeping them maintained shouldn't be that much of a problem I think.

If there is a need for that I would love to submit a PR.

@necolas
Copy link
Member

necolas commented Jan 22, 2013

Problem with tests is that this is a starter template, most people don't use tests, most people don't want us imposing a test framework on them, etc. The reasons for removal still stand.

In some ways helper.js needs to be rethought entirely to move away from a monolithic file that existing within this repo.

@necolas
Copy link
Member

necolas commented Jan 22, 2013

cc @alexgibson - thoughts on this?

@alexgibson
Copy link
Member

My view is that helper.js in its current state is a bit of a mess. I would like to see it restructured in some way, so it can be maintained in a more modular way perhaps. This would also make it more suitable for a test suite, which I think is a good idea - more so for our benefit (and for anyone who wants to contribute). You're right that most people would not have a use for it, but for something like helper.js I think it still warrants consideration.

@necolas
Copy link
Member

necolas commented Jan 22, 2013

What if we broke it out into a separate repo or simply consumed other projects that already address those features.

@alexgibson
Copy link
Member

I quite like the idea of consuming other open source projects for these features - there are numerous alternatives to fastButton, scaleFix etc… that arguably do it better? Maybe we could compile a list of alternatives and see.

@alexgibson
Copy link
Member

Some alternative repos / plugins for some of the more commonly used MBP methods:

hide url bar -
https://github.com/scottjehl/Hide-Address-Bar

orientation fix -
https://github.com/scottjehl/iOS-Orientationchange-Fix

tap plugins -
https://github.com/borismus/pointer.js
https://github.com/alexgibson/tap.js
https://github.com/cheeaun/tappable

@drublic
Copy link
Member Author

drublic commented Jan 29, 2013

Yes, I like the idea. Could it be something we should track in another bug for the next major release? Seems to work pretty good for HTML5 BP.

@alexgibson
Copy link
Member

Opened a new issue for this to discuss :)

@necolas
Copy link
Member

necolas commented Feb 14, 2013

FWIW, I think Hans is right. If there is anything that could do with testing in this repo (for our purposes rather than "he's a test framework you should use"), we should consider it doing so. This repo doesn't necessarily have to be tied to the same constraints that we have with the HTML5 Boilerplate.

@alexgibson
Copy link
Member

Agreed - once we decide on #164 we should revisit this, and see if we can write tests for any methods that remain.

@drublic
Copy link
Member Author

drublic commented Feb 14, 2013

There are some mobile frameworks out there like Ratchet that provide some of the functionality that is needed for mobile development. Question is where we draw the line to call it a "boilerplate".
Is it necessary to scroll to the top of a page in 95% of mobile web-pages? If yes, it should be part of the boilerplate. And if it's in, it should be tested.

HTML5BP is clearly set to provide the minimum. I think the target for the Mobile Boilerplate project still needs to be defined.
:)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants