Re: Using WPT as unit tests for polyfill libraries?

On 17/02/15 07:54, Glen Huang wrote:
> Hi,
> 
> I’m writing a polyfill library that would like to use Web Platform
> Tests as unit tests, but I encounter a few obstacles:
> 
> - How to automate the tests in multiple browsers? More specifically,
> is it possible to integrate WPT into, say, saucelabs? - Some tests
> are just too edge-case (e.g., toString(Event) should equal "[object
> Function]” or class=“name name” should only return one class name) to
> be covered by a polyfill library. Is it possible to cherry-pick tests
> without forking the project?
> 
> Or is WPT never meant to be used as unit tests for other libraries,
> and I’m looking at the wrong project?

So the thing I haven't worked out is how you plan to inject the
polyfilly itself into the testcase dom. I can think of some crazy
schemes involving testharnessreport.js that might work for some
polyfills, but nothing obviously good.

Received on Wednesday, 18 February 2015 11:07:27 UTC