Skip to content

Commit

Permalink
chore: dir test
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxuanzhangsfdx committed Jul 30, 2024
1 parent f6829c3 commit bd43a9c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/utils/createUtil.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { assert, expect } from 'chai';
import * as fs from 'fs';
import * as path from 'path';
import { SinonStub, stub } from 'sinon';
import * as os from 'os';

/* tslint:disable: no-unused-expression */
describe('CreateUtil', () => {
Expand Down Expand Up @@ -88,6 +89,20 @@ describe('CreateUtil', () => {
};
});

describe('DIR', () => {
let homedirStub: SinonStub;
beforeEach(() => {
homedirStub = stub(os, 'homedir');
});
it('should return DIR', () => {
const homedir = '/Users/johndoe';
homedirStub.returns(homedir);
const sfdxStateFolder = '.sfdx';
const dir = CreateUtil.DIR;
expect(dir).to.eql(path.join(homedir, sfdxStateFolder));
});
});

describe('getCommandTemplatesInSubdirs', () => {
const templateType = 'lightningcomponent';
const templatePath = path.resolve(
Expand Down

0 comments on commit bd43a9c

Please sign in to comment.