Skip to content

Commit

Permalink
Merge pull request #867 from forcedotcom/ew/sfProjectJson-stub-docs
Browse files Browse the repository at this point in the history
chore: add SfProjectJson stub example
  • Loading branch information
mshanemc authored Jun 20, 2023
2 parents 1aff5f6 + 43d9d85 commit 0955891
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![NPM](https://img.shields.io/npm/v/@salesforce/core.svg)](https://www.npmjs.com/package/@salesforce/core)
[![CircleCI](https://circleci.com/gh/forcedotcom/sfdx-core.svg?style=svg&circle-token=2377ca31221869e9d13448313620486da80e595f)](https://circleci.com/gh/forcedotcom/sfdx-core)

- [Description](#description)
- [Usage](#usage)
Expand Down
17 changes: 17 additions & 0 deletions TEST_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,26 @@ describe('Mocking Config', () => {
});
});

describe('Mocking a project config file', () => {
it('stubs the project config file', async () => {
$$.setConfigStubContents('SfProjectJson', {
contents: {
packageDirectories: [
{
path: 'force-app',
default: true,
},
],
sourceApiVersion: '57.0',
},
});
});
});

describe('Mocking Arbitrary Config Files', () => {
it('example', async () => {
// MyConfigFile must extend the ConfigFile class in order for this to work properly.
// Examples include: DeployCache, DeployPipelineCache, ScratchOrgCache
$$.setConfigStubContents('MyConfigFile', { contents: { foo: 'bar' } });
});
});
Expand Down

0 comments on commit 0955891

Please sign in to comment.