Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Allison Leong committed Apr 8, 2019
1 parent be9dda4 commit aa32b81
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { expect } from 'chai';
import * as path from 'path';
import {
BundlePathStrategy,
DefaultPathStrategy
} from '../../../../src/commands/templates/baseTemplateCommand';

it.only('successfully creates the bundle path', () => {
const bundlePathStrategy = new BundlePathStrategy();
const expectedPath = path.join('test-dir', 'TestClass', '.cls');
expect(
bundlePathStrategy.getPathToSource('test-dir', 'TestClass', '.cls')
).to.equal(expectedPath);
});

it('successfully creates a default source path', () => {
const defaultPathStrategy = new DefaultPathStrategy();
const expectedPath = path.join('test-dir', 'TestCmp', 'TestCmp.cmp');
expect(
defaultPathStrategy.getPathToSource('test-dir', 'TestCmp', '.cmp')
).to.equal(expectedPath);
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

import { expect } from 'chai';
import { ForceApexTriggerCreateExecutor } from '../../../src/commands/templates/forceApexTriggerCreate';
import { nls } from '../../../src/messages';
import { ForceApexTriggerCreateExecutor } from '../../../../src/commands/templates/forceApexTriggerCreate';
import { nls } from '../../../../src/messages';

// tslint:disable:no-unused-expression
describe('Force Apex Trigger Create', () => {
Expand Down

0 comments on commit aa32b81

Please sign in to comment.