Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Parameterize plugin for QUnit2.x #13

Merged
merged 2 commits into from Dec 2, 2016

Conversation

bluePlayer
Copy link
Contributor

It was deprecated for QUnit 2.x. I oppened the file in Aptana and modified to work without warnings in JSlint. I also removed async() which does not exist in QUnit 2.x and test() function should be used according to the upgrade guide: http://qunitjs.com/upgrade-guide-2.x/

I also added init() function which accepts array of objects which represent parameters for each test case. It returns this(the "cases" object).

I also added test parameters as text when using createTest() so you see which parameters are sent for each specific test.

@bluePlayer bluePlayer changed the title Create ParameterizeForQUnit2.x Update Parameterize plugin for QUnit2.x Oct 19, 2016
I removed printing test params in title since I found that it looks cluttered and non-readable when the test params include large stub objects. You can always use QUnit.log(callback) function. Check: https://api.qunitjs.com/QUnit.log/
@durandj
Copy link

durandj commented Nov 29, 2016

@AStepaniuk, do you think you are going to accept this PR? My team is kind of stuck because we need to move to QUnit2.x but we also use qunit-parameterize.

@bluePlayer
Copy link
Contributor Author

@durandj Hello. I wrote a tutorial on how to use my update of the plugin: http://tunephp.blogspot.mk/2016/11/qunit-parameterize-plugin.html

It works well but I haven't used combinatorial and sequential much so I cannot say these functions are bug free. Yes I have tried them just so I try them, they don't break while executing.
I also haven't need for combinatorial. Sequential is by default. All sets of parameters you give in the init() array argument are executed sequentially. I have also used it with done() https://api.qunitjs.com/QUnit.done/ which is executing tests asynchronously.

Hope this helps.

@AStepaniuk AStepaniuk merged commit ae61ba1 into AStepaniuk:master Dec 2, 2016
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.

None yet

3 participants