jberger / Mojo-Phantom

PhantomJS client-side testing for Mojolicious apps
Other
13 stars 6 forks source link

add option to not automatically call phantom.exit #4

Closed plicease closed 8 years ago

plicease commented 8 years ago

I found it frequently useful to be able to explicitly call phantom.exit() from my own javascript to test asynchronous events, but the explicit call in the template made this hard.

jberger commented 8 years ago

I like this a lot. Does this mean we should explicitly depend on Test2 (I think we should but I mean in the cpanfile). Also I should then finally get the line number situation fixed (which Test2 allows).

plicease commented 8 years ago

Assuming you are okay with the test that I wrote I believe what you actually need is Test-Simple 1.302015 (or Test2.pm same version) because this module will be mixing both Test2 and Test::More. The test also uses Test-Suite, but I don't think you need a particular version of that. I didn't update the prereqs because we can at this point rewrite the test if you did for some reason want to delay the prereq on Test2. I think Test2 is definitely the way to go regardless, but especially if it solves the line number problem.

plicease commented 8 years ago

I've updated the prereqs. #5 also has some Test2 stuff, but I think this PR is ready for merging now (?), whereas #5 needs at least a little thought.