Skip to content

Commit 5e2e392

Browse files
committed
test(@angular-devkit/build-angular): add appendToFile helper to build harness
1 parent e567e0c commit 5e2e392

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/angular_devkit/build_angular/src/testing/builder-harness.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ export class BuilderHarness<T> {
256256
return this.execute(options).pipe(first()).toPromise();
257257
}
258258

259+
async appendToFile(path: string, content: string): Promise<void> {
260+
await this.writeFile(path, this.readFile(path).concat(content));
261+
}
262+
259263
async writeFile(path: string, content: string | Buffer): Promise<void> {
260264
this.host
261265
.scopedSync()

0 commit comments

Comments
 (0)