[Pkg-javascript-commits] [node-tap] 100/186: Include a banner at the top of snapshot files encouraging good behavior
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 16:40:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-tap.
commit 1e86c33bdb7557ed921d56ecdc3142cb6647b432
Author: isaacs <i at izs.me>
Date: Sun Nov 19 12:30:45 2017 -0800
Include a banner at the top of snapshot files encouraging good behavior
---
lib/snapshot.js | 8 +++++++-
tap-snapshots/test-run.js-TAP.test.js | 6 ++++++
tap-snapshots/test-spawn.js-TAP.test.js | 6 ++++++
tap-snapshots/test-tap.js-TAP.test.js | 6 ++++++
tap-snapshots/test-test.js-TAP.test.js | 6 ++++++
5 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/lib/snapshot.js b/lib/snapshot.js
index 86af30f..eee5b7a 100644
--- a/lib/snapshot.js
+++ b/lib/snapshot.js
@@ -61,7 +61,13 @@ class Snapshot {
.replace(/\`/g, '\\\`')
.replace(/\$\{/g, '\\${')
- const data = `'use strict'\n` + (
+ const data =
+ '/* IMPORTANT\n' +
+ ' * This snapshot file is auto-generated, but designed for humans.\n' +
+ ' * It should be checked into source control and tracked carefully.\n' +
+ ' * Re-generate by setting TAP_SNAPSHOT=1 and running tests.\n' +
+ ' * Make sure to inspect the output below. Do not ignore changes!\n' +
+ ' */\n\'use strict\'\n' + (
Object.keys(this.snapshot).map(s =>
`exports[\`${
escape(s)
diff --git a/tap-snapshots/test-run.js-TAP.test.js b/tap-snapshots/test-run.js-TAP.test.js
index de1d2e4..9b8761b 100644
--- a/tap-snapshots/test-run.js-TAP.test.js
+++ b/tap-snapshots/test-run.js-TAP.test.js
@@ -1,3 +1,9 @@
+/* IMPORTANT
+ * This snapshot file is auto-generated, but designed for humans.
+ * It should be checked into source control and tracked carefully.
+ * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
+ * Make sure to inspect the output below. Do not ignore changes!
+ */
'use strict'
exports[`test/run.js TAP basic > ok.js output 1`] = `
TAP version 13
diff --git a/tap-snapshots/test-spawn.js-TAP.test.js b/tap-snapshots/test-spawn.js-TAP.test.js
index d83d1c2..d89431a 100644
--- a/tap-snapshots/test-spawn.js-TAP.test.js
+++ b/tap-snapshots/test-spawn.js-TAP.test.js
@@ -1,3 +1,9 @@
+/* IMPORTANT
+ * This snapshot file is auto-generated, but designed for humans.
+ * It should be checked into source control and tracked carefully.
+ * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
+ * Make sure to inspect the output below. Do not ignore changes!
+ */
'use strict'
exports[`test/spawn.js TAP timeout KILL > undefined 1`] = `
SIGTERM
diff --git a/tap-snapshots/test-tap.js-TAP.test.js b/tap-snapshots/test-tap.js-TAP.test.js
index 584e2d0..1d6060a 100644
--- a/tap-snapshots/test-tap.js-TAP.test.js
+++ b/tap-snapshots/test-tap.js-TAP.test.js
@@ -1,3 +1,9 @@
+/* IMPORTANT
+ * This snapshot file is auto-generated, but designed for humans.
+ * It should be checked into source control and tracked carefully.
+ * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
+ * Make sure to inspect the output below. Do not ignore changes!
+ */
'use strict'
exports[`test/tap.js TAP ok > exit status 1`] = `
{ code: 0, signal: null }
diff --git a/tap-snapshots/test-test.js-TAP.test.js b/tap-snapshots/test-test.js-TAP.test.js
index 2fbeadd..81a64be 100644
--- a/tap-snapshots/test-test.js-TAP.test.js
+++ b/tap-snapshots/test-test.js-TAP.test.js
@@ -1,3 +1,9 @@
+/* IMPORTANT
+ * This snapshot file is auto-generated, but designed for humans.
+ * It should be checked into source control and tracked carefully.
+ * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
+ * Make sure to inspect the output below. Do not ignore changes!
+ */
'use strict'
exports[`test/test.js TAP short output checks no plan no options > no plan 1`] = `
TAP version 13
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap.git
More information about the Pkg-javascript-commits
mailing list