Dancer::Plugin::Test::Jasmine::Results - Turn Jasmine output into TAP results
version 0.2.0
use strict; use warnings; use Test::More; use JSON qw/ from_json /; use Test::TCP; use WWW::Mechanize::PhantomJS; use Dancer::Plugin::Test::Jasmine::Results; Test::TCP::test_tcp( client => sub { my $port = shift; my $mech = WWW::Mechanize::PhantomJS->new; $mech->get("http://localhost:$port?test=hello"); jasmine_results from_json $mech->eval_in_page('jasmine.getJSReportAsString()'; }, server => sub { my $port = shift; use Dancer; use MyApp; Dancer::Config->load; set( startup_info => 0, port => $port ); Dancer->dance; }, ); done_testing;
Exports the function jasmine_results, which takes a structure holding the results of Jasmine tests, and produce the equivalent TAP results.
jasmine_results
See Dancer::Plugin::Test::Jasmine for more details.
Yanick Champoux <yanick@babyl.dyndns.org>
This software is copyright (c) 2015 by Yanick Champoux.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dancer::Plugin::Test::Jasmine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer::Plugin::Test::Jasmine
CPAN shell
perl -MCPAN -e shell install Dancer::Plugin::Test::Jasmine
For more information on module installation, please visit the detailed CPAN module installation guide.