if (repoId != null) return die(std, "multiple repository IDs provided");
would it increase clarity to call these paramters: loadPagerankGraph, runPagerankGraph and savePagerankGraph ?
how could this fail?
how would you break this?
errors if load returns stats: REPO_NOT_LOADED
makePagerank Command
- takes three functions as arguments
- loops through the arguments provided, checking for '--help' (prints usage)
- run pagerank if correct command is provided
- then you load the graph
- handles result, saves on "SUCCESS"
const mock = jest.fn(); const command = makePagerankCommand(loader, mockPagerankRunner, mock); => call this 'mockSaver`
"errors if the repoId was not loaded first" "prints a message if the repo is not loaded"