From 43d9d8561aa7a6909dfb4ba934cd32fac3f44342 Mon Sep 17 00:00:00 2001 From: Eric Willhoit Date: Tue, 20 Jun 2023 14:47:21 -0400 Subject: [PATCH] chore: add SfProjectJson stub example --- README.md | 1 - TEST_SETUP.md | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8825d551a5..3dab33a74f 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/TEST_SETUP.md b/TEST_SETUP.md index 9fcb0678c6..b07adb3938 100644 --- a/TEST_SETUP.md +++ b/TEST_SETUP.md @@ -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' } }); }); });