diff --git a/e2e/spring-shell-e2e-tests/test/builtin.test.ts b/e2e/spring-shell-e2e-tests/test/builtin.test.ts index e8861456..db388ef7 100644 --- a/e2e/spring-shell-e2e-tests/test/builtin.test.ts +++ b/e2e/spring-shell-e2e-tests/test/builtin.test.ts @@ -36,7 +36,7 @@ describe('builtin commands', () => { * test for command help command returns expected info */ const commandHelpReturnsInfoDesc = 'command help returns info'; - const commandHelpCommand = ['help help']; + const commandHelpCommand = ['help', 'help']; const commandHelpReturnsInfo = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { diff --git a/e2e/spring-shell-e2e-tests/test/sample-e2e-boolean-arity1-default-true.test.ts b/e2e/spring-shell-e2e-tests/test/sample-e2e-boolean-arity1-default-true.test.ts index e694c0ab..fdf64e99 100644 --- a/e2e/spring-shell-e2e-tests/test/sample-e2e-boolean-arity1-default-true.test.ts +++ b/e2e/spring-shell-e2e-tests/test/sample-e2e-boolean-arity1-default-true.test.ts @@ -21,7 +21,7 @@ describe('e2e commands boolean-arity1-default-true', () => { * testBooleanArity1DefaultTrue */ const annoDefaultWithoutOverwriteReturnsTrueDesc = 'default without overwrite returns true (anno)'; - const annoDefaultWithoutOverwriteCommand = ['e2e anno boolean-arity1-default-true']; + const annoDefaultWithoutOverwriteCommand = ['e2e', 'anno', 'boolean-arity1-default-true']; const annoDefaultWithoutOverwriteReturnsTrue = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -35,7 +35,7 @@ describe('e2e commands boolean-arity1-default-true', () => { * testBooleanArity1DefaultTrueRegistration */ const regDefaultWithoutOverwriteReturnsTrueDesc = 'default without overwrite returns true (reg)'; - const regDefaultWithoutOverwriteCommand = ['e2e reg boolean-arity1-default-true']; + const regDefaultWithoutOverwriteCommand = ['e2e', 'reg', 'boolean-arity1-default-true']; const regOptionalWithoutOverwriteReturnsTrue = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -49,7 +49,7 @@ describe('e2e commands boolean-arity1-default-true', () => { * testBooleanArity1DefaultTrue */ const annoDefaultWithOverwriteFalseReturnsFalseDesc = 'default with overwrite false returns false (anno)'; - const annoDefaultWithOverwriteFalseCommand = ['e2e anno boolean-arity1-default-true --overwrite false']; + const annoDefaultWithOverwriteFalseCommand = ['e2e', 'anno', 'boolean-arity1-default-true', '--overwrite', 'false']; const annoDefaultWithOverwriteFalseReturnsFalse = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -63,7 +63,7 @@ describe('e2e commands boolean-arity1-default-true', () => { * testBooleanArity1DefaultTrueRegistration */ const regDefaultWithOverwriteFalseReturnsFalseDesc = 'default with overwrite false returns false (reg)'; - const regDefaultWithOverwriteFalseCommand = ['e2e reg boolean-arity1-default-true --overwrite false']; + const regDefaultWithOverwriteFalseCommand = ['e2e', 'reg', 'boolean-arity1-default-true', '--overwrite', 'false']; const regOptionalWithOverwriteFalseReturnsFalse = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { diff --git a/e2e/spring-shell-e2e-tests/test/sample-e2e-default-value.test.ts b/e2e/spring-shell-e2e-tests/test/sample-e2e-default-value.test.ts index a76c584d..392d5ea3 100644 --- a/e2e/spring-shell-e2e-tests/test/sample-e2e-default-value.test.ts +++ b/e2e/spring-shell-e2e-tests/test/sample-e2e-default-value.test.ts @@ -22,7 +22,7 @@ describe('e2e commands default-value', () => { * testDefaultValue */ const annoDefaultWithoutArgReturnsHiDesc = 'default without arg returns hi (anno)'; - const annoDefaultWithoutArgCommand = ['e2e anno default-value']; + const annoDefaultWithoutArgCommand = ['e2e', 'anno', 'default-value']; const annoDefaultWithoutArgReturnsHi = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -36,7 +36,7 @@ describe('e2e commands default-value', () => { * testDefaultValueRegistration */ const regDefaultWithoutArgReturnsHiDesc = 'default without arg returns hi (reg)'; - const regDefaultWithoutArgCommand = ['e2e reg default-value']; + const regDefaultWithoutArgCommand = ['e2e', 'reg', 'default-value']; const regOptionalWithoutArgReturnsHi = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -50,7 +50,7 @@ describe('e2e commands default-value', () => { * testDefaultValue */ const annoDefaultWithArgReturnsFooDesc = 'default with arg returns foo (anno)'; - const annoDefaultWithArgCommand = ['e2e anno default-value --arg1 foo']; + const annoDefaultWithArgCommand = ['e2e', 'anno', 'default-value', '--arg1', 'foo']; const annoDefaultWithArgReturnsFoo = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -64,7 +64,7 @@ describe('e2e commands default-value', () => { * testDefaultValueRegistration */ const regDefaultWithArgReturnsFooDesc = 'default with arg returns foo (reg)'; - const regDefaultWithArgCommand = ['e2e reg optional-value --arg1 foo']; + const regDefaultWithArgCommand = ['e2e', 'reg', 'optional-value', '--arg1', 'foo']; const regDefaultWithArgReturnsFoo = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -78,7 +78,7 @@ describe('e2e commands default-value', () => { * testDefaultValueBoolean1 - 1 */ const annoDefaultValueBoolean1WithoutArgReturnsFalseDesc = 'default boolean1 without arg returns false (anno)'; - const annoDefaultValueBoolean1WithoutArgCommand = ['e2e anno default-value-boolean1']; + const annoDefaultValueBoolean1WithoutArgCommand = ['e2e', 'anno', 'default-value-boolean1']; const annoDefaultValueBoolean1WithoutArgReturnsFalse = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -92,7 +92,7 @@ describe('e2e commands default-value', () => { * testDefaultValueBoolean1Registration - 1 */ const regDefaultValueBoolean1WithoutArgReturnsFalseDesc = 'default boolean1 without arg returns false (reg)'; - const regDefaultValueBoolean1WithoutArgCommand = ['e2e reg default-value-boolean1']; + const regDefaultValueBoolean1WithoutArgCommand = ['e2e', 'reg', 'default-value-boolean1']; const regDefaultValueBoolean1WithoutArgReturnsFalse = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -106,7 +106,7 @@ describe('e2e commands default-value', () => { * testDefaultValueBoolean1 - 2 */ const annoDefaultValueBoolean2WithArgReturnsTrueDesc = 'default boolean1 with arg returns true (anno)'; - const annoDefaultValueBoolean2WithArgCommand = ['e2e anno default-value-boolean1 --arg1']; + const annoDefaultValueBoolean2WithArgCommand = ['e2e', 'anno', 'default-value-boolean1', '--arg1']; const annoDefaultValueBoolean2WithArgReturnsTrue = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -120,7 +120,7 @@ describe('e2e commands default-value', () => { * testDefaultValueBoolean1Registration - 2 */ const regDefaultValueBoolean2WithArgReturnsTrueDesc = 'default boolean1 with arg returns true (reg)'; - const regDefaultValueBoolean2WithArgCommand = ['e2e reg default-value-boolean1 --arg1']; + const regDefaultValueBoolean2WithArgCommand = ['e2e', 'reg', 'default-value-boolean1', '--arg1']; const regDefaultValueBoolean2WithArgReturnsTrue = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -134,7 +134,7 @@ describe('e2e commands default-value', () => { * testDefaultValueBoolean1 - 3 */ const annoDefaultValueBoolean3WithArgReturnsFalseDesc = 'default boolean1 with arg returns false (anno)'; - const annoDefaultValueBoolean3WithArgCommand = ['e2e anno default-value-boolean1 --arg1 false']; + const annoDefaultValueBoolean3WithArgCommand = ['e2e', 'anno', 'default-value-boolean1', '--arg1', 'false']; const annoDefaultValueBoolean3WithArgReturnsFalse = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -148,7 +148,7 @@ describe('e2e commands default-value', () => { * testDefaultValueBoolean1Registration - 3 */ const regDefaultValueBoolean3WithArgReturnsFalseDesc = 'default boolean1 with arg returns false (reg)'; - const regDefaultValueBoolean3WithArgCommand = ['e2e reg default-value-boolean1 --arg1 false']; + const regDefaultValueBoolean3WithArgCommand = ['e2e', 'reg', 'default-value-boolean1', '--arg1', 'false']; const regDefaultValueBoolean3WithArgReturnsFalse = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -162,7 +162,7 @@ describe('e2e commands default-value', () => { * testDefaultValueBoolean2 - 1 */ const annoDefaultValueBoolean2WithoutArgReturnsTrueDesc = 'default boolean2 without arg returns true (anno)'; - const annoDefaultValueBoolean2WithoutArgCommand = ['e2e anno default-value-boolean2']; + const annoDefaultValueBoolean2WithoutArgCommand = ['e2e', 'anno', 'default-value-boolean2']; const annoDefaultValueBoolean2WithoutArgReturnsTrue = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -176,7 +176,7 @@ describe('e2e commands default-value', () => { * testDefaultValueBoolean2Registration - 1 */ const regDefaultValueBoolean2WithoutArgReturnsTrueDesc = 'default boolean2 without arg returns true (reg)'; - const regDefaultValueBoolean2WithoutArgCommand = ['e2e reg default-value-boolean2']; + const regDefaultValueBoolean2WithoutArgCommand = ['e2e', 'reg', 'default-value-boolean2']; const regDefaultValueBoolean2WithoutArgReturnsTrue = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -190,7 +190,7 @@ describe('e2e commands default-value', () => { * testDefaultValueBoolean3 - 1 */ const annoDefaultValueBoolean3WithoutArgReturnsFalseDesc = 'default boolean3 without arg returns false (anno)'; - const annoDefaultValueBoolean3WithoutArgCommand = ['e2e anno default-value-boolean3']; + const annoDefaultValueBoolean3WithoutArgCommand = ['e2e', 'anno', 'default-value-boolean3']; const annoDefaultValueBoolean3WithoutArgReturnsFalse = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -204,7 +204,7 @@ describe('e2e commands default-value', () => { * testDefaultValueBoolean3Registration - 1 */ const regDefaultValueBoolean3WithoutArgReturnsFalseDesc = 'default boolean3 without arg returns false (reg)'; - const regDefaultValueBoolean3WithoutArgCommand = ['e2e reg default-value-boolean3']; + const regDefaultValueBoolean3WithoutArgCommand = ['e2e', 'reg', 'default-value-boolean3']; const regDefaultValueBoolean3WithoutArgReturnsFalse = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { diff --git a/e2e/spring-shell-e2e-tests/test/sample-e2e-exit-code.test.ts b/e2e/spring-shell-e2e-tests/test/sample-e2e-exit-code.test.ts index 2de8f692..b383e225 100644 --- a/e2e/spring-shell-e2e-tests/test/sample-e2e-exit-code.test.ts +++ b/e2e/spring-shell-e2e-tests/test/sample-e2e-exit-code.test.ts @@ -18,7 +18,7 @@ describe('e2e commands exit-code', () => { let options: string[] = []; const missingArgRet2Desc = 'missing arg returns 2'; - const missingArgRet2Command = ['e2e reg exit-code']; + const missingArgRet2Command = ['e2e', 'reg', 'exit-code']; const missingArgRet2 = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -29,7 +29,7 @@ describe('e2e commands exit-code', () => { }; const customArgRet3Desc = 'custom arg returns 3'; - const customArgRet3Command = ['e2e reg exit-code --arg1 ok']; + const customArgRet3Command = ['e2e', 'reg', 'exit-code', '--arg1', 'ok']; const customArgRet3 = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -40,7 +40,7 @@ describe('e2e commands exit-code', () => { }; const customArgRet4Desc = 'custom arg returns 4'; - const customArgRet4Command = ['e2e reg exit-code --arg1 fun']; + const customArgRet4Command = ['e2e', 'reg', 'exit-code', '--arg1', 'fun']; const customArgRet4 = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { diff --git a/e2e/spring-shell-e2e-tests/test/sample-e2e-optional-value.test.ts b/e2e/spring-shell-e2e-tests/test/sample-e2e-optional-value.test.ts index 7222b118..e5b083fa 100644 --- a/e2e/spring-shell-e2e-tests/test/sample-e2e-optional-value.test.ts +++ b/e2e/spring-shell-e2e-tests/test/sample-e2e-optional-value.test.ts @@ -22,7 +22,7 @@ describe('e2e commands optional-value', () => { * testOptionalValue */ const annoOptionalWithoutArgReturnsNullDesc = 'optional without arg returns null (anno)'; - const annoOptionalWithoutArgCommand = ['e2e anno optional-value']; + const annoOptionalWithoutArgCommand = ['e2e', 'anno', 'optional-value']; const annoOptionalWithoutArgReturnsNull = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -36,7 +36,7 @@ describe('e2e commands optional-value', () => { * testOptionalValueRegistration */ const regOptionalWithoutArgReturnsNullDesc = 'optional without arg returns null (reg)'; - const regOptionalWithoutArgCommand = ['e2e reg optional-value']; + const regOptionalWithoutArgCommand = ['e2e', 'reg', 'optional-value']; const regOptionalWithoutArgReturnsNull = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -50,7 +50,7 @@ describe('e2e commands optional-value', () => { * testOptionalValue */ const annoOptionalWithArgReturnsNullDesc = 'optional with arg returns hi (anno)'; - const annoOptionalWithArgCommand = ['e2e anno optional-value --arg1 hi']; + const annoOptionalWithArgCommand = ['e2e', 'anno', 'optional-value', '--arg1', 'hi']; const annoOptionalWithArgReturnsNull = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -64,7 +64,7 @@ describe('e2e commands optional-value', () => { * testOptionalValueRegistration */ const regOptionalWithArgReturnsHiDesc = 'optional with arg returns hi (reg)'; - const regOptionalWithArgCommand = ['e2e reg optional-value --arg1 hi']; + const regOptionalWithArgCommand = ['e2e', 'reg', 'optional-value', '--arg1', 'hi']; const regOptionalWithArgReturnsHi = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { diff --git a/e2e/spring-shell-e2e-tests/test/sample-e2e-required-value.test.ts b/e2e/spring-shell-e2e-tests/test/sample-e2e-required-value.test.ts index 8d24a380..52981d08 100644 --- a/e2e/spring-shell-e2e-tests/test/sample-e2e-required-value.test.ts +++ b/e2e/spring-shell-e2e-tests/test/sample-e2e-required-value.test.ts @@ -18,7 +18,7 @@ describe('e2e commands required-value', () => { let options: string[] = []; const annoRequiredWithoutArgReturnsErrorDesc = 'required without arg returns error (anno)'; - const annoRequiredWithoutArgCommand = ['e2e anno required-value']; + const annoRequiredWithoutArgCommand = ['e2e', 'anno', 'required-value']; const annoRequiredWithoutArgReturnsError = async (cli: Cli) => { cli.run(); await waitForExpect(async () => { @@ -29,7 +29,7 @@ describe('e2e commands required-value', () => { }; const regRequiredWithoutArgReturnsErrorDesc = 'required without arg returns error (reg)'; - const regRequiredWithoutArgCommand = ['e2e reg required-value']; + const regRequiredWithoutArgCommand = ['e2e', 'reg', 'required-value']; const regRequiredWithoutArgReturnsError = async (cli: Cli) => { cli.run(); await waitForExpect(async () => {