diff --git a/src/tests/add/__snapshots__/prettier.spec.ts.snap b/src/tests/add/__snapshots__/prettier.spec.ts.snap index 7c7be63..fb6c8ca 100644 --- a/src/tests/add/__snapshots__/prettier.spec.ts.snap +++ b/src/tests/add/__snapshots__/prettier.spec.ts.snap @@ -195,15 +195,6 @@ exports[`nbx add:prettier should work with tslint and commits and with an empty `; exports[`nbx add:prettier should work with tslint and commits and with an empty config 2`] = ` -" -
- testokiii - - -" -`; - -exports[`nbx add:prettier should work with tslint and commits and with an empty config 3`] = ` Array [ "Adding prettier as a dev dependency", "The step was done without any error.", @@ -236,15 +227,6 @@ exports[`nbx add:prettier should work with tslint and commits and with an existi `; exports[`nbx add:prettier should work with tslint and commits and with an existing extends as array 2`] = ` -" - - testokiii - - -" -`; - -exports[`nbx add:prettier should work with tslint and commits and with an existing extends as array 3`] = ` Array [ "Adding prettier as a dev dependency", "The step was done without any error.", @@ -277,15 +259,6 @@ exports[`nbx add:prettier should work with tslint and commits and with an existi `; exports[`nbx add:prettier should work with tslint and commits and with an existing extends as string 2`] = ` -" - - testokiii - - -" -`; - -exports[`nbx add:prettier should work with tslint and commits and with an existing extends as string 3`] = ` Array [ "Adding prettier as a dev dependency", "The step was done without any error.", @@ -318,15 +291,6 @@ exports[`nbx add:prettier should work with tslint and commits and with an existi `; exports[`nbx add:prettier should work with tslint and commits and with an existing rules config 2`] = ` -" - - testokiii - - -" -`; - -exports[`nbx add:prettier should work with tslint and commits and with an existing rules config 3`] = ` Array [ "Adding prettier as a dev dependency", "The step was done without any error.", @@ -349,6 +313,28 @@ Array [ ] `; +exports[`nbx add:prettier should work with tslint and commits and with only lint with l flag 1`] = ` +Array [ + "Adding tslint-config-prettier as a dev dependency", + "The step was done without any error.", + "Adding tslint-plugin-prettier as a dev dependency", + "The step was done without any error.", + "Updating tslint.json", + "The step was done without any error.", +] +`; + +exports[`nbx add:prettier should work with tslint and commits and with only lint with onlyLint flag 1`] = ` +Array [ + "Adding tslint-config-prettier as a dev dependency", + "The step was done without any error.", + "Adding tslint-plugin-prettier as a dev dependency", + "The step was done without any error.", + "Updating tslint.json", + "The step was done without any error.", +] +`; + exports[`nbx add:prettier should work without commits 1`] = ` " diff --git a/src/tests/add/prettier.spec.ts b/src/tests/add/prettier.spec.ts index 3a837eb..3354aac 100644 --- a/src/tests/add/prettier.spec.ts +++ b/src/tests/add/prettier.spec.ts @@ -10,7 +10,7 @@ import { TestRun, } from '../test-helpers.spec'; -jest.setTimeout(90000); +jest.setTimeout(6000); const beforeCreateHtml = async () => { filesystem.write('test.html', 'testokiii'); @@ -62,10 +62,10 @@ export const expectEslintWithParams = ({ expectGitCommits({ before: async () => { filesystem.write(eslintName, eslintJson); + await beforeCreateHtml(); if (onlyLint) { prompts.inject([true, true]); } else { - await beforeCreateHtml(); prompts.inject([true, '**/*.{js,vue,json,ts,tsx,md,yml,html}', true]); } }, @@ -156,10 +156,10 @@ export const expectTslintWithParams = ({ expectGitCommits({ before: async () => { filesystem.write('tslint.json', tslintJson); + await beforeCreateHtml(); if (onlyLint) { prompts.inject([true, true]); } else { - await beforeCreateHtml(); prompts.inject([true, '**/*.{js,vue,json,ts,tsx,md,yml,html}', true]); } }, @@ -250,7 +250,6 @@ testCli({ 'There is no package.json not found in the current folder', before: async () => { filesystem.remove('package.json'); - prompts.inject([true, '**/*.{js,vue,json,ts,tsx,md,yml,html}']); }, }), }, @@ -264,7 +263,7 @@ testCli({ }, }, before: async () => { - prompts.inject([true, '**/*.{js,vue,json,ts,tsx,md,yml,html}']); + prompts.inject([true]); }, }), },