From bee11087af88336f5a7650b8c35fd37ef97be25c Mon Sep 17 00:00:00 2001 From: Pat Cavit Date: Fri, 21 Jul 2017 23:19:08 -0700 Subject: [PATCH] test: enable danger & tweak messaging --- .travis.yml | 5 +++-- dangerfile.js | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a0b3b3e2..d825fa73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,10 +15,11 @@ install: - npm install - npm install --no-save @alrra/travis-scripts@^3.0.1 gh-pages@^0.12.0 -# Create bundles before running tests so they're always up-to-date -# Pass -save to build-min so it'll update the readme as well +# Run danger, build bundles (so they're always up to date) before_script: +- npx danger run - npm run build-browser +# Pass -save so it'll update the readme as well - npm run build-min -- -save # Run tests, lint, and then check for perf regressions diff --git a/dangerfile.js b/dangerfile.js index 0f027250..89ea4277 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -35,7 +35,9 @@ if(danger.github.pr.base.ref !== "next") { // Any non-test JS changes should probably have a change-log entry if(appfiles.length && !changelog) { - warn(`Please include a ${link("docs/change-log.md", "changelog")} entry.`) + warn(dedent(` + Please add an entry to ${link("docs/change-log.md")}. + `)) } // Call out if `o.only(...)` was left in @@ -47,7 +49,7 @@ jsfiles locs.forEach((loc) => fail(dedent(` - ${link(file, `#L${loc.line}`)} is preventing tests from running. + Please remove the \`o.only\` from ${link(file, `#L${loc.line}`)}.
 				${pinpoint(code, {line: loc.line, column : loc.cursor})}