Skip to content
Snippets Groups Projects
Commit be04c31b authored by Steven Hargrove's avatar Steven Hargrove Committed by Rhys Arkins
Browse files

test: added jest serializer for renovate configs

parent c78da837
No related branches found
No related tags found
No related merge requests found
...@@ -138,7 +138,8 @@ ...@@ -138,7 +138,8 @@
"setupFiles": [ "setupFiles": [
"./test/globals.js" "./test/globals.js"
], ],
"setupTestFrameworkScriptFile": "./test/chai.js" "setupTestFrameworkScriptFile": "./test/chai.js",
"snapshotSerializers": ["./test/newline-snapshot-serializer.js"]
}, },
"prettier": { "prettier": {
"singleQuote": true, "singleQuote": true,
......
...@@ -6,37 +6,7 @@ Object { ...@@ -6,37 +6,7 @@ Object {
"commitMessage": "Update lock file", "commitMessage": "Update lock file",
"enabled": false, "enabled": false,
"groupName": null, "groupName": null,
"prBody": "This Pull Request updates \`package.json\` lock files to use the latest dependency versions. "prBody": "This Pull Request updates \`package.json\` lock files to use the latest dependency versions.\\n\\n{{#if schedule}}\\n**Note**: This PR was created on a configured schedule (\\"{{{schedule}}}\\"{{#if timezone}} in timezone \`{{{timezone}}}\`{{/if}}) and will not receive updates outside those times.\\n{{/if}}\\n\\n{{#if hasErrors}}\\n\\n---\\n\\n# Errors\\n\\nRenovate encountered some errors when processing your repository, so you are being notified here even if they do not directly apply to this PR.\\n\\n{{#each errors as |error|}}\\n- \`{{error.depName}}\`: {{error.message}}\\n{{/each}}\\n{{/if}}\\n\\n{{#if hasWarnings}}\\n\\n---\\n\\n# Warnings\\n\\nPlease make sure the following warnings are safe to ignore:\\n\\n{{#each warnings as |warning|}}\\n- \`{{warning.depName}}\`: {{warning.message}}\\n{{/each}}\\n{{/if}}",
{{#if schedule}}
**Note**: This PR was created on a configured schedule (\\"{{{schedule}}}\\"{{#if timezone}} in timezone \`{{{timezone}}}\`{{/if}}) and will not receive updates outside those times.
{{/if}}
{{#if hasErrors}}
---
# Errors
Renovate encountered some errors when processing your repository, so you are being notified here even if they do not directly apply to this PR.
{{#each errors as |error|}}
- \`{{error.depName}}\`: {{error.message}}
{{/each}}
{{/if}}
{{#if hasWarnings}}
---
# Warnings
Please make sure the following warnings are safe to ignore:
{{#each warnings as |warning|}}
- \`{{warning.depName}}\`: {{warning.message}}
{{/each}}
{{/if}}",
"prTitle": "Lock file maintenance", "prTitle": "Lock file maintenance",
"rebaseStalePrs": true, "rebaseStalePrs": true,
"recreateClosed": true, "recreateClosed": true,
......
let prev;
module.exports = {
print(val) {
return JSON.stringify(val);
},
test(val) {
if (['prBody', 'prTitle'].some(str => str === prev)) {
return typeof val === 'string' && val.indexOf('\n') > -1;
}
prev = val;
return false;
},
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment