renovate/test/newline-snapshot-serializer.ts
renovate[bot] 4f59b62da4
chore(deps): update dependency prettier to v2 (#5952)
* chore(deps): update dependency prettier to v2

* Run prettier-fix

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
2020-04-12 18:09:36 +02:00

12 lines
288 B
TypeScript

let prev: string;
export function print(val: any): string {
return JSON.stringify(val);
}
export function test(val: any): boolean {
if (['prBody', 'prTitle'].some((str) => str === prev)) {
return typeof val === 'string' && val.includes('\n');
}
prev = val;
return false;
}