Skip to content

Commit

Permalink
Fix incorrect CLI unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew W. Harn <[email protected]>
  • Loading branch information
awharn committed Nov 20, 2024
1 parent 68ece68 commit b7cfbce
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ describe("Search Datasets handler", () => {
let logMessage = "";
let fakeSession = null;

// Mock the submit JCL function
// Mock the search datasets function
Search.dataSets = jest.fn(async (session) => {
fakeSession = session;
return {
success: true,
commandResponse: "Found \"test\" in 2 data sets and PDS members",
apiResponse: [
{
dsname: "TEST1.DS",
memname: "TESTMEM",
dsn: "TEST1.DS",
member: "TESTMEM",
matchList: [
{
line: 1,
Expand All @@ -48,8 +48,8 @@ describe("Search Datasets handler", () => {
]
},
{
dsname: "TEST2.DS",
memname: undefined,
dsn: "TEST2.DS",
member: undefined,
matchList: [
{
line: 1,
Expand Down Expand Up @@ -139,8 +139,8 @@ describe("Search Datasets handler", () => {
commandResponse: "Found \"test\" in 2 data sets and PDS members",
apiResponse: [
{
dsname: "TEST1.DS",
memname: "TESTMEM",
dsn: "TEST1.DS",
member: "TESTMEM",
matchList: [
{
line: 1,
Expand All @@ -150,8 +150,8 @@ describe("Search Datasets handler", () => {
]
},
{
dsname: "TEST2.DS",
memname: undefined,
dsn: "TEST2.DS",
member: undefined,
matchList: [
{
line: 1,
Expand Down Expand Up @@ -242,8 +242,8 @@ describe("Search Datasets handler", () => {
commandResponse: "Found \"test\" in 2 data sets and PDS members",
apiResponse: [
{
dsname: "TEST1.DS",
memname: "TESTMEM",
dsn: "TEST1.DS",
member: "TESTMEM",
matchList: [
{
line: 1,
Expand All @@ -253,8 +253,8 @@ describe("Search Datasets handler", () => {
]
},
{
dsname: "TEST2.DS",
memname: undefined,
dsn: "TEST2.DS",
member: undefined,
matchList: [
{
line: 1,
Expand Down Expand Up @@ -345,8 +345,8 @@ describe("Search Datasets handler", () => {
commandResponse: "Found \"test\" in 2 data sets and PDS members",
apiResponse: [
{
dsname: "TEST1.DS",
memname: "TESTMEM",
dsn: "TEST1.DS",
member: "TESTMEM",
matchList: [
{
line: 1,
Expand All @@ -356,8 +356,8 @@ describe("Search Datasets handler", () => {
]
},
{
dsname: "TEST2.DS",
memname: undefined,
dsn: "TEST2.DS",
member: undefined,
matchList: [
{
line: 1,
Expand Down Expand Up @@ -448,8 +448,8 @@ describe("Search Datasets handler", () => {
commandResponse: "Found \"test\" in 2 data sets and PDS members",
apiResponse: [
{
dsname: "TEST1.DS",
memname: "TESTMEM",
dsn: "TEST1.DS",
member: "TESTMEM",
matchList: [
{
line: 1,
Expand All @@ -459,8 +459,8 @@ describe("Search Datasets handler", () => {
]
},
{
dsname: "TEST2.DS",
memname: undefined,
dsn: "TEST2.DS",
member: undefined,
matchList: [
{
line: 1,
Expand Down Expand Up @@ -551,8 +551,8 @@ describe("Search Datasets handler", () => {
commandResponse: "Found \"test\" in 2 data sets and PDS members",
apiResponse: [
{
dsname: "TEST1.DS",
memname: "TESTMEM",
dsn: "TEST1.DS",
member: "TESTMEM",
matchList: [
{
line: 1,
Expand All @@ -562,8 +562,8 @@ describe("Search Datasets handler", () => {
]
},
{
dsname: "TEST2.DS",
memname: undefined,
dsn: "TEST2.DS",
member: undefined,
matchList: [
{
line: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ exports[`Search Datasets handler process method should search a data set if requ
Object {
"apiResponse": Array [
Object {
"dsname": "TEST1.DS",
"dsn": "TEST1.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": "TESTMEM",
"member": "TESTMEM",
},
Object {
"dsname": "TEST2.DS",
"dsn": "TEST2.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": undefined,
"member": undefined,
},
],
"commandResponse": "Found \\"test\\" in 2 data sets and PDS members",
Expand All @@ -42,26 +42,26 @@ exports[`Search Datasets handler process method should search a data set if requ
Object {
"apiResponse": Array [
Object {
"dsname": "TEST1.DS",
"dsn": "TEST1.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": "TESTMEM",
"member": "TESTMEM",
},
Object {
"dsname": "TEST2.DS",
"dsn": "TEST2.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": undefined,
"member": undefined,
},
],
"commandResponse": "Found \\"test\\" in 2 data sets and PDS members",
Expand All @@ -80,26 +80,26 @@ exports[`Search Datasets handler process method should search a data set if requ
Object {
"apiResponse": Array [
Object {
"dsname": "TEST1.DS",
"dsn": "TEST1.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": "TESTMEM",
"member": "TESTMEM",
},
Object {
"dsname": "TEST2.DS",
"dsn": "TEST2.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": undefined,
"member": undefined,
},
],
"commandResponse": "Found \\"test\\" in 2 data sets and PDS members",
Expand All @@ -118,26 +118,26 @@ exports[`Search Datasets handler process method should search a data set if requ
Object {
"apiResponse": Array [
Object {
"dsname": "TEST1.DS",
"dsn": "TEST1.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": "TESTMEM",
"member": "TESTMEM",
},
Object {
"dsname": "TEST2.DS",
"dsn": "TEST2.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": undefined,
"member": undefined,
},
],
"commandResponse": "Found \\"test\\" in 2 data sets and PDS members",
Expand All @@ -156,26 +156,26 @@ exports[`Search Datasets handler process method should search a data set if requ
Object {
"apiResponse": Array [
Object {
"dsname": "TEST1.DS",
"dsn": "TEST1.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": "TESTMEM",
"member": "TESTMEM",
},
Object {
"dsname": "TEST2.DS",
"dsn": "TEST2.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": undefined,
"member": undefined,
},
],
"commandResponse": "Found \\"test\\" in 2 data sets and PDS members",
Expand All @@ -194,26 +194,26 @@ exports[`Search Datasets handler process method should search a data set if requ
Object {
"apiResponse": Array [
Object {
"dsname": "TEST1.DS",
"dsn": "TEST1.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": "TESTMEM",
"member": "TESTMEM",
},
Object {
"dsname": "TEST2.DS",
"dsn": "TEST2.DS",
"matchList": Array [
Object {
"column": 1,
"contents": "TEST CONTENTS",
"line": 1,
},
],
"memname": undefined,
"member": undefined,
},
],
"commandResponse": "Found \\"test\\" in 2 data sets and PDS members",
Expand Down

0 comments on commit b7cfbce

Please sign in to comment.