Use a camera when local to pi, use test data(still images) when on a local system.
In an app:
var shim = require('pi-camera-shim');
shim.pullAndProcessLoop(function(err, image, advance, terminate){
//set the actual bytes to something
el.setAttribute('src', image.base64Image);
//pull another image
advance();
//todo: process image
}, 'path/to/test/image/directory');
In a test suite, to force the app into test mode in the directory provided in the call:
shim.pcMode = true;
In a test suite, to force the app into a specific directory
shim.pcMode = '/path/to/the/dir';
To save 100 images from the Camera:
shim.saveFrames('path/to/test/image/directory', function(err, count){
//done, frames in path/to/test/image/directory/image-0.jpg - image-<count>.jpg
});