mirror of https://github.com/renovatebot/renovate
15 lines
407 B
TypeScript
15 lines
407 B
TypeScript
let prev: string;
|
|
|
|
// this does not work as intended
|
|
// see https://jestjs.io/docs/en/configuration#snapshotserializers-arraystring
|
|
export function print(val: string): string {
|
|
return JSON.stringify(val);
|
|
}
|
|
export function test(val: string): boolean {
|
|
if (['prBody', 'prTitle'].some((str) => str === prev)) {
|
|
return typeof val === 'string' && val.includes('\n');
|
|
}
|
|
prev = val;
|
|
return false;
|
|
}
|