diff --git a/src/commands/eval.mjs b/src/commands/eval.mjs index 03f92ad0..71469ea9 100644 --- a/src/commands/eval.mjs +++ b/src/commands/eval.mjs @@ -255,6 +255,7 @@ function buildEvalCommand(yargs) { query: { type: "string", description: "the query to run", + required: true, }, dbname: { type: "string", diff --git a/src/config/setup-test-container.mjs b/src/config/setup-test-container.mjs index 1bb8d247..eac75672 100644 --- a/src/config/setup-test-container.mjs +++ b/src/config/setup-test-container.mjs @@ -41,6 +41,9 @@ export function setupTestContainer() { const container = setupCommonContainer(); const thingsToManuallyMock = automock(container); + const customfs = stub(fs); + // this is a mock used by the default profile behavior + customfs.readdirSync.withArgs(process.cwd()).returns([]); const manualMocks = { // process specifics @@ -51,7 +54,7 @@ export function setupTestContainer() { // wrap it in a spy so we can record calls, but use the // real implementation parseYargs: awilix.asValue(spy(parseYargs)), - fs: awilix.asValue(stub(fs)), + fs: awilix.asValue(customfs), fsp: awilix.asValue({ unlink: stub(), writeFile: stub(), diff --git a/src/lib/command-helpers.mjs b/src/lib/command-helpers.mjs index 6fffa91b..ffa85e1e 100644 --- a/src/lib/command-helpers.mjs +++ b/src/lib/command-helpers.mjs @@ -100,6 +100,7 @@ export const commonQueryOptions = { secret: { type: "string", description: "the secret to use when calling Fauna", + required: true, }, };