renovate/test/newline-snapshot-serializer.ts
Jamie Magee 8554df5c61 test: convert top level tests to typescript (#4526)
Also convert usage of chai to jest
2019-09-25 11:40:58 +02:00

12 lines
269 B
TypeScript

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