Cypress – Can I change the Viewport Based on The File Path of a Test?

I’m writing a test suite for an application that will predominantly have users on mobile devices, but is likely to have some admin users on laptops. For the majority of tests, I want a mobile orientation, so have the following code in my cypress.config.js file;

viewportHeight: 1280,
viewportWidth: 720,

… Fairly straight forward. All my tests for laptop users will be contained in a separate folder however, so I was wondering if there’s a simple way in Cypress (without writing it in every test case individually) to make it use a different Viewport size if the folder path of the tests is a specific path? I can’t seem to find a neat way to do this.

There won’t be any overlap in testing on the screens that mobile users, and laptop users will need to use. So I’m not trying to test every screen on 2 different orientations, this will be one folder of tests that uses a different Viewport Height/Width than every other folder.

Thanks in advance!