Skip to content

Conversation

@janga1997
Copy link
Contributor

Documentation for menu pattern, and add Chosen to demo page.
I would also like to get started with writing tests ( for some patterns in Forms ), so it would be great if anyone had any tips.

@jcbrand
Copy link
Member

jcbrand commented Mar 7, 2017

Type make check to run the tests.

The tests use Jasmine 1.3 and can either run in the browser or in the console via phantomjs (which is how they run when you type make check).

If you want to run them in the browser, you should type make serve, and then load localhost:4001/tests.html in your browser.

The tests for each pattern goes into the pattern's own directory. They are then loaded for testing in this file: https://github.com/Patternslib/Patterns/blob/master/tests.js

@janga1997
Copy link
Contributor Author

Thanks for the info.@jcbrand !
Although I meant tips on writing the actual tests, which I'm finding little hard to begin with.

@janga1997 janga1997 changed the title documentation for menu documentation and tests for menu Mar 9, 2017
@janga1997
Copy link
Contributor Author

I'm facing a bit of trouble in writing the test. 'Pattern' seems to be always undefined in the statement Pattern.init, even though it is, and I followed the template of other tests.

@thet thet mentioned this pull request Jan 3, 2020
@thet
Copy link
Member

thet commented Jan 3, 2020

Closing this due to follow up: #696

@thet thet closed this Jan 3, 2020
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

Successfully merging this pull request may close these issues.

3 participants