How to use the @zowe/imperative.ImperativeExpect.toNotBeNullOrUndefined function in @zowe/imperative

To help you get started, we’ve selected a few @zowe/imperative examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IBM / zowe-cli-cics-deploy-plugin / __tests__ / __src__ / environment / TestEnvironment.ts View on Github external
public static async setUp(params: ISetupEnvironmentParms): Promise {
        // Validate the input parameters
        ImperativeExpect.toNotBeNullOrUndefined(params,
            `${TestEnvironment.ERROR_TAG} createTestEnv(): No parameters supplied.`);
        ImperativeExpect.keysToBeDefinedAndNonBlank(params, ["testName"],
            `${TestEnvironment.ERROR_TAG} createTestEnv(): You must supply the name of the test. ` +
            `Used to append to the data directory for ease of identification.`);

        // Get a unique test data area
        const testDirectory: string = TestEnvironment.createUniqueTestDataDir(params.testName);

        // set the env variables to be used for executing
        // scripts in the test environment
        const env: { [key: string]: string } = {};
        env[this.HOME_ENV_KEY] = testDirectory;

        const result: ITestEnvironment = {
            workingDir: testDirectory,
            systemTestProperties: null,