Skip to content

Commit

Permalink
fix: 2pp plugin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iowillhoit committed Apr 10, 2023
1 parent ab63966 commit 4a0e043
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export type PackageJson = {
'test:deprecation-policy': string;
'test:json-schema': string;
};
wireit: {
test: {
dependencies: string;
};
};
};

export enum Hook {
Expand Down
2 changes: 1 addition & 1 deletion test/commands/dev/audit/messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as fs from 'fs';
import { expect } from 'chai';
import helpers = require('yeoman-test');
import { Config } from '@oclif/core';
import AuditMessages from '../../../../lib/commands/dev/audit/messages';
import AuditMessages from '../../../../src/commands/dev/audit/messages';

describe('audit messages', () => {
let runResult: helpers.RunResult;
Expand Down
8 changes: 4 additions & 4 deletions test/commands/dev/generate/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ describe('dev generate plugin', () => {
'sf:logout': './lib/hooks/logout',
});

const scripts = Object.keys(packageJson.scripts);
expect(scripts).to.include('test:json-schema');
expect(scripts).to.include('test:deprecation-policy');
expect(scripts).to.include('test:command-reference');
const testDependencyScripts = packageJson.wireit.test.dependencies;
expect(testDependencyScripts).to.include('test:json-schema');
expect(testDependencyScripts).to.include('test:deprecation-policy');
expect(testDependencyScripts).to.include('test:command-reference');

runResult.assertFileContent(
path.join(runResult.cwd, 'plugin-test', 'src', 'commands', 'hello', 'world.ts'),
Expand Down

0 comments on commit 4a0e043

Please sign in to comment.