mirror of https://github.com/openclaw/openclaw.git
test(commands): use lightweight clears in config snapshot specs
This commit is contained in:
parent
b014c70292
commit
ed38b50fa5
|
|
@ -27,7 +27,7 @@ describe("agents add command", () => {
|
|||
beforeEach(() => {
|
||||
readConfigFileSnapshotMock.mockClear();
|
||||
writeConfigFileMock.mockClear();
|
||||
wizardMocks.createClackPrompter.mockReset();
|
||||
wizardMocks.createClackPrompter.mockClear();
|
||||
runtime.log.mockClear();
|
||||
runtime.error.mockClear();
|
||||
runtime.exit.mockClear();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ async function runIdentityCommandFromWorkspace(workspace: string, fromIdentity =
|
|||
|
||||
describe("agents set-identity command", () => {
|
||||
beforeEach(() => {
|
||||
configMocks.readConfigFileSnapshot.mockReset();
|
||||
configMocks.readConfigFileSnapshot.mockClear();
|
||||
configMocks.writeConfigFile.mockClear();
|
||||
runtime.log.mockClear();
|
||||
runtime.error.mockClear();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ describe("channelsAddCommand", () => {
|
|||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
configMocks.readConfigFileSnapshot.mockReset();
|
||||
configMocks.readConfigFileSnapshot.mockClear();
|
||||
configMocks.writeConfigFile.mockClear();
|
||||
offsetMocks.deleteTelegramUpdateOffset.mockClear();
|
||||
runtime.log.mockClear();
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ describe("models set + fallbacks", () => {
|
|||
});
|
||||
|
||||
beforeEach(() => {
|
||||
readConfigFileSnapshot.mockReset();
|
||||
readConfigFileSnapshot.mockClear();
|
||||
writeConfigFile.mockClear();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue