[%# tests.tt Run JS unit tests Authors: Afuna Copyright (c) 2015 by Dreamwidth Studios, LLC. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. For a copy of the license, please reference 'perldoc perlartistic' or 'perldoc perlgpl'. %] [% testname = testname | html %] [%- includes = includes.merge( [ "js/tests/qunit.js", "stc/tests/qunit.css", "js/tests/sinon.js", "js/tests/sinon-qunit.js" ] ) -%] [%- IF testlib == "jquery"; dw.need_res( { group => "jquery" }, includes ); CALL dw.active_resource_group( "jquery" ); ELSIF testlib == "old"; dw.need_res( includes ); ELSE; dw.need_res( { group => "nolib" }, includes ); CALL dw.active_resource_group( "nolib" ); END -%] [%- sections.head = BLOCK %] [% END %] [%- IF tests -%]

[% testname %]

    [% testhtml %]
    [% ELSE %]

    No tests for [% testname %]

      [%- END -%]