test: enable danger & tweak messaging

This commit is contained in:
Pat Cavit 2017-07-21 23:19:08 -07:00
parent a7849a67ca
commit bee11087af
2 changed files with 7 additions and 4 deletions

View file

@ -15,10 +15,11 @@ install:
- npm install - npm install
- npm install --no-save @alrra/travis-scripts@^3.0.1 gh-pages@^0.12.0 - 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 # Run danger, build bundles (so they're always up to date)
# Pass -save to build-min so it'll update the readme as well
before_script: before_script:
- npx danger run
- npm run build-browser - npm run build-browser
# Pass -save so it'll update the readme as well
- npm run build-min -- -save - npm run build-min -- -save
# Run tests, lint, and then check for perf regressions # Run tests, lint, and then check for perf regressions

View file

@ -35,7 +35,9 @@ if(danger.github.pr.base.ref !== "next") {
// Any non-test JS changes should probably have a change-log entry // Any non-test JS changes should probably have a change-log entry
if(appfiles.length && !changelog) { 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 // Call out if `o.only(...)` was left in
@ -47,7 +49,7 @@ jsfiles
locs.forEach((loc) => locs.forEach((loc) =>
fail(dedent(` fail(dedent(`
${link(file, `#L${loc.line}`)} is preventing tests from running. Please remove the \`o.only\` from ${link(file, `#L${loc.line}`)}.
<pre lang="javascript"> <pre lang="javascript">
${pinpoint(code, {line: loc.line, column : loc.cursor})} ${pinpoint(code, {line: loc.line, column : loc.cursor})}
</pre> </pre>