App-remarkpl
view release on metacpan or search on metacpan
t/remarkpl.t view on Meta::CPAN
use Mojo::Base -strict;
use Mojo::File 'path';
use Test::Mojo;
use Test::More;
$ENV{MOJO_APP_LOADER} = 1;
plan skip_all => $@ unless do(path(qw(script remarkpl))->to_abs);
my $t = Test::Mojo->new;
$t->get_ok('/')->status_is(200)->text_is('title', 'example.markdown - remarkpl')
->element_exists('head > link[href="/fonts.css"]')
->element_exists('head > link[href="/basic.css"]')
->element_exists('body > script[src="/remark.min.js"]')
->element_exists('body > script[src="/custom.js"]')
->content_like(qr{<script>const slideshow = remark\.create\(\);</script>})
->text_like('textarea', qr{\# remark presentation example.*The end}s);
$t->get_ok('/fonts.css')->status_is(200);
$t->get_ok('/basic.css')->status_is(200);
$t->get_ok('/custom.css')->status_is(200);
$t->get_ok('/remark.min.js')->status_is(200);
$t->get_ok('/custom.js')->status_is(200);
done_testing;
( run in 0.805 second using v1.01-cache-2.11-cpan-5735350b133 )