Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brandenrodgers committed Nov 22, 2024
1 parent d2b2e6d commit 1748cb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions commands/__tests__/project.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import add from '../project/add';
import migrateApp from '../project/migrateApp';
import cloneApp from '../project/cloneApp';
import installDeps from '../project/installDeps';
import { addConfigOptions, addAccountOptions } from '../../lib/commonOpts';

jest.mock('yargs');
jest.mock('../project/deploy');
Expand All @@ -39,7 +38,7 @@ import projectCommand from '../project';
describe('commands/project', () => {
describe('command', () => {
it('should have the correct command structure', () => {
expect(projectCommand.command).toEqual('project');
expect(projectCommand.command).toEqual(['project', 'projects']);
});
});

Expand Down Expand Up @@ -77,16 +76,6 @@ describe('commands/project', () => {
expect(yargs.demandCommand).toHaveBeenCalledWith(1, '');
});

it('should support the correct options', () => {
projectCommand.builder(yargs);

expect(addConfigOptions).toHaveBeenCalledTimes(1);
expect(addConfigOptions).toHaveBeenCalledWith(yargs);

expect(addAccountOptions).toHaveBeenCalledTimes(1);
expect(addAccountOptions).toHaveBeenCalledWith(yargs);
});

it('should add the correct number of sub commands', () => {
projectCommand.builder(yargs);
expect(yargs.command).toHaveBeenCalledTimes(subcommands.length);
Expand Down
2 changes: 1 addition & 1 deletion commands/project/__tests__/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const deployCommand = require('../deploy');
describe('commands/project/deploy', () => {
const projectFlag = 'project';
const buildFlag = 'build';
const buildAliases = ['buildId'];
const buildAliases = ['build-id'];

describe('command', () => {
it('should have the correct command structure', () => {
Expand Down

0 comments on commit 1748cb6

Please sign in to comment.