-
Notifications
You must be signed in to change notification settings - Fork 5
Loading local files #34
Comments
Hello @talltyler, this module uses lasso underneath the hood. So you can just Ex:
If you need to add additional dependencies that are not commonjs modules, for example dist version of Ex: module.exports = {
lassoDependencies: [
'path/to/dist/jquery.js'
]
} Dependencies given as the |
Sorry I wasn't clear. I'm not talking about modules or libraries of code. I'm talking about ajax style loading of static files, like images, text files and so on from within my tests. I can load these files from external urls but I would like to load a file related to the test that I am writing. Other test runners have the ability to specify a path of files that can be later loaded from the local port that is created when the tests run. Is there a way to do this? |
Ah I see. Sorry but at the moment this is not a feature that is supported. This would be very useful feature to have though. Any ideas on what you think the best api for this would look like? cc @austinkelleher |
Just a path in the config would work. Then from a tests it would be cool if urls could load from either file:// or from localhost from a port configurable from the config again. |
I agree that this is a feature that we should implement. @talltyler any interest in working on this? |
I never had a chance to pick this up, it would be great is someone else had the time to do it. Sorry. |
When Puppeteer is started there are a number of dependencies that are loaded into the browsers window but these are all hard coded from what I can see. Is there a way to give tests access to local files that can be loaded into tests?
The text was updated successfully, but these errors were encountered: