Created
June 10, 2020 15:29
-
-
Save subeshb1/2e69c7acf0e63b3cf5f19b27314f5499 to your computer and use it in GitHub Desktop.
External script api-test
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
let testCase = process.argv[2]; // First arg will be test case key | |
let body = process.argv[3]; // Second arg will be body | |
let header = process.argv[4]; // Third arg will be header | |
let success = true; | |
switch (testCase) { | |
case "get_api": | |
if (success) { | |
process.exit(0); // For success case | |
} else { | |
process.exit(1); // For failure case | |
} | |
break; | |
case "invalid_post_api": | |
... | |
break; | |
default: | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment