testing a 'folder of files' locally.
See original GitHub issueIs it possible to test ‘everything’ from the url provide? For example I have a load of design patterns that can be accessed via http://localhost:3000/components/preview/
… currently I need to add the pattern i want to test rather than being able to test everything all at once … is this possible?
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Testing with files and directories - Testfixtures - Read the Docs
We can test this function by passing it the temporary directory's path and then using the TempDirectory.read() method to check the files were...
Read more >Testing using local files - Stack Overflow
Common test data that will be used by multiple packages are either placed in the application root or in $HOME .
Read more >How to Set Up a Test Directory for Your Website - Dummies.com
A test directory is a folder you create that sits at the root level of the remote server. By uploading a copy of...
Read more >Check Existence of Local File in R (2 Examples)
This tutorial explains how to test whether a file exists in a local directory in the R programming language. The post is structured...
Read more >How to Write File-Based JavaScript Tests With Real Files
Hey guys, this post is about writing tests for projects that access the file system by reading and writing files to disk.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your pointers @garris - I’ve managed to get it working in my starter project that uses Fractal … https://github.com/sturobson/SCL
The config file is here - https://github.com/sturobson/SCL/blob/master/backstopConfig.js and I’m running all the things via gulp - https://github.com/sturobson/SCL/blob/master/gulpfile.js
I’m going to close this now - I’m hoping to do a quick write-up about this too.
Ok. I understand. Yes. You can do this using a module based config file.
Instead of hard-coding your config, you would create a three step process. – Step 1: use node FS to look inside a target directory to programmatically create an array of file paths you want tested. (e.g. add any file ending in
.html
) – Step 2: create a newscenarios
array by cloning a base scenario object for each file path you created in step 1, remember to replace the url property in each newly cloned scenario object. – Step 3: return (export) a full config object which includes thescenarios
array you created in step 2.Just remember to run
npm run reference
when you create new files to keep everything in sync.Hope this helps. Please post back if you complete this script – I have had requests for this kind of thing before so, I know others would appreciate the example.
Cheers.