Skip to content

[test] Make add-org automated more robust: interactive input #880

@nemesifier

Description

@nemesifier

Follow up of #808 and #871.

Why config/__tests__/add-org.test.js? It's pretty different from anything else we have here.
Would just config/add-org.test.js work?

I tried commenting out a critical line like:

diff --git a/config/add-org.js b/config/add-org.js
index edfa4d1..f13c9e4 100644
--- a/config/add-org.js
+++ b/config/add-org.js
@@ -219,7 +219,7 @@ const createConfiguration = async (response) => {
 
 const createConfigurationWithPrompts = async () => {
   const response = await prompt(prompts);
-  createConfiguration(response);
+  // createConfiguration(response);
 };
 
 const createConfigurationWithoutPrompts = (passedData) => {

The tests passed anyway. Is this correct? Doesn't look right to me, I would expect at least one test to fail.
The last test method seems to test prompts but doesn't check the result, I would at least check that given a series of prompts the result matches what we expect from the prompts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Backlog

    Status

    To do (general)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions