Fix testing setup
This commit is contained in:
parent
0897f7a545
commit
3784418567
1 changed files with 266 additions and 119 deletions
|
|
@ -333,16 +333,19 @@ export class MockAgent extends MockClient {
|
|||
.includes(content);
|
||||
});
|
||||
|
||||
if (
|
||||
!this.useSlowFileEvents
|
||||
|
||||
) {
|
||||
if (!this.useSlowFileEvents) {
|
||||
assert(
|
||||
found.length <= 1,
|
||||
`[${this.name}] Binary content ${content} found in multiple files: ${found.join(", ")}`
|
||||
);
|
||||
}
|
||||
|
||||
if (!this.useSlowFileEvents && !this.doDeletes) {
|
||||
assert(
|
||||
found.length >= 1,
|
||||
`[${this.name}] Binary content ${content} not found in any files`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -510,9 +513,7 @@ export class MockAgent extends MockClient {
|
|||
`Decided to update binary file ${file}`
|
||||
);
|
||||
this.doNotTouchWhileOffline.push(file);
|
||||
this.files.set(file, bytes);
|
||||
|
||||
|
||||
await this.write(file, bytes);
|
||||
}
|
||||
|
||||
private async deleteFileAction(): Promise<void> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue