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
Would be nice if someone could think of a a piece of TypeScript code for the method.js tests, that calls a TSAsExpression.
Here are the exact steps:
Clone the repo, install dependencies (I am expecting the person who wants to help to be able to do this on their own)
Write two piece of TypeScript code that calls the result of a TSAsExpression. The first one should pass (along the lines of foo()) - the second one should not (along the lines of document.write(evil)).
Look at the test case objects in tests/method.js, find existing tests that look similar enough and make a copy of those cases and add them to the end of the file
Run the test (npm run test) and ensure that error message in your test case matches the error message that will be thrown. If not, adjust
Submit a Pull Request for review :)
The text was updated successfully, but these errors were encountered:
nyc
is reporting no code coverage for the lineseslint-plugin-no-unsanitized/lib/rules/method.js
Lines 129 to 130 in 8dae8ae
Would be nice if someone could think of a a piece of TypeScript code for the method.js tests, that calls a TSAsExpression.
Here are the exact steps:
foo()
) - the second one should not (along the lines ofdocument.write(evil)
).npm run test
) and ensure that error message in your test case matches the error message that will be thrown. If not, adjustThe text was updated successfully, but these errors were encountered: