Skip to content

Commit

Permalink
Clean up code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alli committed Dec 14, 2018
1 parent 564fa1b commit c727e41
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
7 changes: 1 addition & 6 deletions packages/salesforcedx-vscode-core/src/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,4 @@
import { SfdxCoreSettings } from './sfdxCoreSettings';

export const sfdxCoreSettings = SfdxCoreSettings.getInstance();
export {
FileEventType,
getPackageDirectoriesGlobString,
pushOrDeploy,
registerPushOrDeployOnSave
} from './pushOrDeployOnSave';
export { registerPushOrDeployOnSave } from './pushOrDeployOnSave';
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('SourcePathChecker', () => {
showErrorMessageSpy.restore();
});

it('Should continue when source path is package directory', async () => {
it('Should continue when source path is a package directory', async () => {
const getProjectDirectoriesStub = stub(
SfdxProjectJsonParser.prototype,
'getPackageDirectoryPaths'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
FileEventType,
getPackageDirectoriesGlobString,
pushOrDeploy
} from '../../src/settings';
} from '../../src/settings/pushOrDeployOnSave';

const OrgType = context.OrgType;
/* tslint:disable:no-unused-expression */
Expand Down Expand Up @@ -161,7 +161,7 @@ describe('pushOrDeploy', () => {
executeCommandStub.restore();
});

const testPushOrDeployOn = async (fileEvent: FileEventType) => {
const testPushOn = async (fileEvent: FileEventType) => {
await pushOrDeploy(fileEvent);

expect(executeCommandStub.calledOnce).to.be.true;
Expand All @@ -173,15 +173,15 @@ describe('pushOrDeploy', () => {
};

it('should call force:source:push on file creation', async () => {
await testPushOrDeployOn(FileEventType.Create);
await testPushOn(FileEventType.Create);
});

it('should call force:source:push on file change', async () => {
await testPushOrDeployOn(FileEventType.Change);
await testPushOn(FileEventType.Change);
});

it('should call force:source:push on file deletion', async () => {
await testPushOrDeployOn(FileEventType.Delete);
await testPushOn(FileEventType.Delete);
});
});

Expand Down

0 comments on commit c727e41

Please sign in to comment.