-
Notifications
You must be signed in to change notification settings - Fork 0
/
requirements.test.js
27 lines (26 loc) · 996 Bytes
/
requirements.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import "dotenv/config";
import { execPromise } from "./utils/general.mjs";
// Check for .env API_URL variable
test("Checking for .env API_URL variable...", () => {
expect(typeof process.env.API_URL).toBe("string");
});
// Check for Vault CLI
test("Checking for Vault CLI...", async () => {
const vCli = await execPromise("vault -v");
expect(typeof vCli).toBe("string");
});
// Check for .env OAuth related variables
test("Checking for .env OAuth related variables...", () => {
expect(typeof process.env.NP_SECRETS).toBe("string");
expect(typeof process.env.PROD_SECRETS).toBe("string");
expect(typeof process.env.OAUTH_ENDPOINT).toBe("string");
});
// Check for Google Cloud CLI
test("Checking for Google Cloud CLI...", async () => {
const gCli = await execPromise("gcloud version");
expect(typeof gCli).toBe("string");
});
// Check for .env PROJECT_ID variable
test("Checking for .env PROJECT_ID variable...", () => {
expect(typeof process.env.PROJECT_ID).toBe("string");
});