docs.nestjs.com icon indicating copy to clipboard operation
docs.nestjs.com copied to clipboard

[Testing] E2E authorization using strategies

Open orenherman opened this issue 6 years ago • 0 comments

I'm submitting a...


[ ] Regression 
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

I've implemented several passport strategies and would like to unit test them. Currently all of the strategies extends the PassportStrategy class, and i haven't found any way to mock only the base strategy and test the PassportStrategy 'validate' method.

Expected behavior

An entry point, or something to mock the base strategy to allow testing strategies.

orenherman avatar Jan 13 '19 09:01 orenherman