-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@whook/cli): allow to inspect injector results
- Loading branch information
Showing
7 changed files
with
644 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
169 changes: 169 additions & 0 deletions
169
packages/whook-cli/src/commands/__snapshots__/inspect.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`inspectCommand should fail with no result 2`] = ` | ||
Object { | ||
"injectorCalls": Array [ | ||
Array [ | ||
Array [ | ||
"MYSQL", | ||
], | ||
], | ||
], | ||
"logCalls": Array [ | ||
Array [ | ||
"error", | ||
"Could not find any results for nothing_here", | ||
], | ||
], | ||
"promptArgsCalls": Array [ | ||
Array [], | ||
], | ||
} | ||
`; | ||
|
||
exports[`inspectCommand should fail with unexisting config name 2`] = ` | ||
Object { | ||
"injectorCalls": Array [ | ||
Array [ | ||
Array [ | ||
"DOES_NOT_EXIST", | ||
], | ||
], | ||
], | ||
"logCalls": Array [ | ||
Array [ | ||
"error", | ||
"No service found for DOES_NOT_EXIST", | ||
], | ||
Array [ | ||
"error", | ||
"try debugging with the DEBUG=whook env.", | ||
], | ||
], | ||
"promptArgsCalls": Array [ | ||
Array [], | ||
], | ||
} | ||
`; | ||
|
||
exports[`inspectCommand should work with an unexisting config but a default value 2`] = ` | ||
Object { | ||
"injectorCalls": Array [ | ||
Array [ | ||
Array [ | ||
"DOES_NOT_EXIST", | ||
], | ||
], | ||
], | ||
"logCalls": Array [ | ||
Array [ | ||
"error", | ||
"No service found for DOES_NOT_EXIST", | ||
], | ||
Array [ | ||
"error", | ||
"try debugging with the DEBUG=whook env.", | ||
], | ||
Array [ | ||
"info", | ||
"\\"v8\\"", | ||
], | ||
], | ||
"promptArgsCalls": Array [ | ||
Array [], | ||
], | ||
"result": undefined, | ||
} | ||
`; | ||
|
||
exports[`inspectCommand should work with no query at all 2`] = ` | ||
Object { | ||
"injectorCalls": Array [ | ||
Array [ | ||
Array [ | ||
"MYSQL", | ||
], | ||
], | ||
], | ||
"logCalls": Array [ | ||
Array [ | ||
"info", | ||
"{\\"auth\\":{\\"username\\":\\"root\\"},\\"version\\":\\"2.1.1\\"}", | ||
], | ||
], | ||
"promptArgsCalls": Array [ | ||
Array [], | ||
], | ||
"result": undefined, | ||
} | ||
`; | ||
|
||
exports[`inspectCommand should work with no result but a default value 2`] = ` | ||
Object { | ||
"injectorCalls": Array [ | ||
Array [ | ||
Array [ | ||
"MYSQL", | ||
], | ||
], | ||
], | ||
"logCalls": Array [ | ||
Array [ | ||
"error", | ||
"Could not find any results for nothing_here", | ||
], | ||
Array [ | ||
"info", | ||
"\\"v8\\"", | ||
], | ||
], | ||
"promptArgsCalls": Array [ | ||
Array [], | ||
], | ||
"result": undefined, | ||
} | ||
`; | ||
|
||
exports[`inspectCommand should work with one value 2`] = ` | ||
Object { | ||
"injectorCalls": Array [ | ||
Array [ | ||
Array [ | ||
"MYSQL", | ||
], | ||
], | ||
], | ||
"logCalls": Array [ | ||
Array [ | ||
"info", | ||
"\\"root\\"", | ||
], | ||
], | ||
"promptArgsCalls": Array [ | ||
Array [], | ||
], | ||
"result": undefined, | ||
} | ||
`; | ||
|
||
exports[`inspectCommand should work with several values 2`] = ` | ||
Object { | ||
"injectorCalls": Array [ | ||
Array [ | ||
Array [ | ||
"MYSQL", | ||
], | ||
], | ||
], | ||
"logCalls": Array [ | ||
Array [ | ||
"info", | ||
"\\"root\\"", | ||
], | ||
], | ||
"promptArgsCalls": Array [ | ||
Array [], | ||
], | ||
"result": undefined, | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.