W3C home > Mailing lists > Public > public-test-infra@w3.org > April to June 2014

Re: Single file tests

From: James Graham <james@hoppipolla.co.uk>
Date: Fri, 18 Apr 2014 23:24:03 +0100
Message-ID: <5351A603.5070400@hoppipolla.co.uk>
To: "public-test-infra@w3.org" <public-test-infra@w3.org>
On 01/04/14 23:07, James Graham wrote:
> So one request I've had from people at Mozilla used to writing
> Mochitests is an easier way to write testharness.js tests, particularly
> for the special case where there is exactly one test per file. This is a
> interesting case because the file itself provides the isolation that we
> usually try to obtain by wrapping each test step in a function() {}, so
> it is possible to cut out some of the verbosity. An example of the kind
> of result we might get is
>
> <doctype html>
> <title>Example test</title>
> <script src=/resources/testharness.js></script>
> <script src=/resources/testharnessreport.js></script>
> <script>
> setup({file_is_test:true})
>
> onload = function() {assert_true(true); done()}

This has now landed.
Received on Friday, 18 April 2014 22:24:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:34:10 UTC