File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
exports [` ssh ephemeral access should call p0 request with reason arg: args 1` ] = `
4
4
{
5
- " $0" : " /Users/nathanbrahms/dev/p0cli/node_modules/.bin/jest" ,
6
5
" _" : [
7
6
" ssh" ,
8
7
],
@@ -37,7 +36,6 @@ exports[`ssh ephemeral access should call ssm: stderr 1`] = `
37
36
38
37
exports [` ssh persistent access should call p0 request with reason arg: args 1` ] = `
39
38
{
40
- " $0" : " /Users/nathanbrahms/dev/p0cli/node_modules/.bin/jest" ,
41
39
" _" : [
42
40
" ssh" ,
43
41
],
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { mockGetDoc } from "../../testing/firestore";
15
15
import { sleep } from "../../util" ;
16
16
import { sshCommand } from "../ssh" ;
17
17
import { onSnapshot } from "firebase/firestore" ;
18
+ import { omit } from "lodash" ;
18
19
import yargs from "yargs" ;
19
20
20
21
jest . mock ( "../../drivers/api" ) ;
@@ -60,7 +61,11 @@ describe("ssh", () => {
60
61
it ( "should call p0 request with reason arg" , async ( ) => {
61
62
void sshCommand ( yargs ( ) ) . parse ( `ssh some-instance --reason reason` ) ;
62
63
await sleep ( 100 ) ;
63
- expect ( mockFetchCommand . mock . calls [ 0 ] [ 1 ] ) . toMatchSnapshot ( "args" ) ;
64
+ const hiddenFilenameRequestArgs = omit (
65
+ mockFetchCommand . mock . calls [ 0 ] [ 1 ] ,
66
+ "$0"
67
+ ) ;
68
+ expect ( hiddenFilenameRequestArgs ) . toMatchSnapshot ( "args" ) ;
64
69
} ) ;
65
70
66
71
it ( "should wait for access grant" , async ( ) => {
You can’t perform that action at this time.
0 commit comments