You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0xedward
changed the title
Set up a test framework to create unit and integration tests
Set up a test framework to create and run unit and integration tests
Jul 7, 2021
ideally:
- clone wpt from https://github.com/web-platform-tests/wpt
- open a browser that is configured to run wpt
- figure out how to execute the polyfill on every site
- run the wpt tests for the sanitizer-api subfolder
Note: it looks like the trusted-types repo is doing that at https://github.com/w3c/webappsec-trusted-types/tree/main/tests/platform-tests
practically (short term)
- clone test cases from https://github.com/web-platform-tests/wpt/blob/master/sanitizer-api/support/testcases.sub.js
- DIY test-framework that uses the test cases, start with sanitize() function only.
0xedward
added a commit
to 0xedward/sanitizer-polyfill
that referenced
this issue
Jul 11, 2021
As of right now, we will need to write unit tests for functions in
src/sanitizer.js
and integration tests forSanitizer
methods.We might be able to draw inspiration from the testing setup and the test cases in DOMPurify
The text was updated successfully, but these errors were encountered: