Skip to content

Commit

Permalink
[#88] Fix cli-tool tests
Browse files Browse the repository at this point in the history
  • Loading branch information
malparty committed Aug 4, 2022
1 parent 1742bce commit f17b325
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
10 changes: 0 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/cli-tool/test/commands/generate/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { tailwindCssTestData } from '../../add-ons/ui-framework/tailwind-css';
import { gitHubTestData, gitLabTestData, noVersionControlTestData } from '../../add-ons/version-control';
import { TestScenario } from '../../helpers/test-scenario';

const craRepoPath = `file:./react-templates/packages/cra-template`;
const viteBranch = 'feature/gh88-replace-webpack-with-vite';
const craTemplateReference = `file:./react-templates/packages/cra-template`;
const viteTemplateReference = 'feature/gh88-replace-webpack-with-vite';
const projectName = 'test-app';
const testFolderPath = '../../../';

Expand Down Expand Up @@ -126,7 +126,7 @@ describe('generate', () => {
test
.stdout()
.stub(Inquirer, 'prompt', () => scenario.options)
.command(['generate', `${projectName}`, scenario.options.template === 'vite' ? viteBranch : craRepoPath, testFolderPath])
.command(['generate', `${projectName}`, testFolderPath, scenario.options.template === 'vite' ? viteTemplateReference : craTemplateReference])
.it(
`generates a ${scenario.options.template} app ${projectName} with ${scenario.options.versionControl} and ${scenario.options.uiFramework}`,
(ctx) => {
Expand Down

0 comments on commit f17b325

Please sign in to comment.