valueof / hiro Goto Github PK
View Code? Open in Web Editor NEWFramework for testing third-party JavaScript applications
Home Page: http://hirojs.com/
Framework for testing third-party JavaScript applications
Home Page: http://hirojs.com/
Hiro ==== Hiro is a framework for testing third-party JavaScript applications. It runs each test suite in a separate sandbox preventing global state leaks and conflicts. Stable version can be found here: http://hirojs.com/. The current *master* branch contains the source of Hiro 2, backwards incompatible iteration of Hiro that is scheduled to be released soon. Patches ------- Before submitting a patch please make sure that: 0) You have an issue opened describing your problem or proposal. 1) You use tabs for indentation. 2) Your coding style looks similar to what is already in the repo. 3) All JavaScript files pass JSHint check (you can run 'grunt lint' to automatically lint files. 4) All tests pass. To run tests open 'tests/test.html' in your browser. 5) Example tests behave as intended. To check that execute 'grunt run' and open http://localhost:7777/ in your browser. Execute all tests and you should see only three failures: * BasicTests.testFailedTest * Basictests.testFailedExpect * FailedSuite.testSimple These failures were introduced for UI demonstration purposes. 6) Your commit messages look good (no one-liners please). See most recent commit messages for reference. Author ------ Anton Kovalyov http://anton.kovalyov.net @valueof
Right now the assert functions are using loose comparison operators within the assert methods, is there any particular reason not to use strict comparisons?
Useful for newcomers to get into Hiro and for contributors to make sure UI is not broken.
EOM
It just fails with a red error bar - there's no indication of what actually happened.
New fancy pants Hiro website
EOM.
Whenever the module name is incorrect an error message should be shown to indicate why the test could not be run.
I can't seem to find any documentation on how to run Hiro using PhantomJS. I'm no expert on the subject but with a little help I could write up a small cookbook article.
EOM
If you use pause/resume in a test, that test will ignore any prior expectations re: # of assertions.
EOM
In cases where Hiro fails to load certain resources the test suite will stop executing.
For example, we have several test cases which will load an html, javascript, or css file, and as soon as that fails the test suite bails (no events are fired/etc).
If you have more assertions that are expected, the message is kind of off.
If you have a failed assertion, Hiro continues executing the test function until it reaches the end. It only stops if an exception is thrown.
I think it would be nice to have a few more assertions.
assertGreaterThan
assertGreaterThanOrEqualTo
assertLessThan
assertLessThanOrEqualTo
assertUndefined
assertNull
assertInstanceOf
assertObjectHasProperty
assertArrayContains
I'm not to sure about the names of the last two. What do you think?
Would you like me to open a PR?
Final check before merge: can we run Disqus tests with Hiro 2?
Before the merge need to make sure that we can run new Hiro with PhantomJS.
Debugging failed assertions is difficult because the current reporting mechanism doesn't list the affected object/function, source code line, etc.
QUnit does this: http://docs.jquery.com/QUnit#Using_QUnit
Before merge, need to make sure that you can run new Hiro from inside the browser.
Hi,
This looks like a nice testing framework, but it doesn't have a license file or any license embedded in the source code. Would you mind adding one? cough Permissive license cough
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.