The tests should create a 'sandboxed' filesystem instance something like so:

     var sandbox = require("..../filesystem.js").withBaseDir(<path to test file system contents>);

Other apis (the ones being tested) should be 'configured' by passing in the sandbox filesystem. E.g like so

     	var api = require('../../server/jsdepend/amd-resolver').configure(sandbox);

See amd-resolver-test for example. It may be a little confusing there that 'filesystem' is consistently called 'configuration'.
Really most places where the variable or parameter name 'configuration' or 'conf' is used, what is being passed in or 
stored is in fact a filesystem instance. Sometimes with some extra properties added on top. The names should be
changed... but you know how that goes :-)