Instead of control just one ressourceType it's better to control what each configuration/setup needs, in my case i need to mock document, xhr and other things but i don't need scripts files or styles because once they're cached by the Mockeer, i can't certify that my application it's broken because i'm testing it against a cached JS version.
default values as [] empty array so doesn't change anything of the current API that's been used into other projects.
My fixtures sizes was something like 5mb and with this update - allowing you to choose what you be mocking it's down to 50kb each fixture as DO need my CSS files and JS files updated every time through tests.
Instead of control just one ressourceType it's better to control what each configuration/setup needs, in my case i need to mock
document
,xhr
and other things but i don't needscripts
files orstyles
because once they're cached by the Mockeer, i can't certify that my application it's broken because i'm testing it against a cached JS version.So to avoid that an filter based into
ressourceType
listed into Puppteer docs as we can find here: https://pptr.dev/#?product=Puppeteer&version=v1.20.0&show=api-requestresourcetypeYou configure what ressourceTypes you wanna to blacklist using
default values as
[]
empty array so doesn't change anything of the current API that's been used into other projects.My fixtures sizes was something like 5mb and with this update - allowing you to choose what you be mocking it's down to 50kb each fixture as DO need my CSS files and JS files updated every time through tests.