[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 9b230dc 202/340: Fix the "should print the elaps
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 9b230dc 202/340: Fix the "should print the elapsed time for all specs" test |
Date: |
Thu, 16 Dec 2021 14:59:34 -0500 (EST) |
branch: elpa/buttercup
commit 9b230dceeb071f6f4d4c9b6e894df19c851b6649
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>
Fix the "should print the elapsed time for all specs" test
* Reset the spy calls for buttercup--print for each iteration. This
is done before each spec, but in thie spec it has to be done in each
loop iteration as well.
* Set the failure-description to avoid 'nil' in buttercup--print
arguments.
* Only match at the end of the string, and with leading whitespace.
* Allow for elapsed times with no decimals.
---
tests/test-buttercup.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index 5a660e6..bbcb1f3 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -951,7 +951,11 @@
(it "should print the elapsed time for all specs"
(dolist (state '(pending failed passed))
- (setq spec (make-buttercup-spec :description "spec" :status state
:parent child-suite))
+ (spy-calls-reset 'buttercup--print)
+ (setq spec (make-buttercup-spec :description "spec"
+ :parent child-suite
+ :status state
+ :failure-description ""))
(buttercup--set-start-time spec)
(buttercup--set-end-time spec)
(let ((buttercup-reporter-batch--failures nil))
@@ -960,7 +964,7 @@
(expect (mapconcat (apply-partially #'apply #'format)
(spy-calls-all-args 'buttercup--print)
"")
- :to-match "([0-9]+\\.[0-9]+\\(h\\|m\\|m?s\\))"))))
+ :to-match " ([0-9]+\\(\\.[0-9]+\\)?\\(h\\|m\\|m?s\\))\n$"))))
(describe "on the suite-done event"
(it "should emit a newline at the end of the top-level suite"
- [nongnu] elpa/buttercup bcaa7f0 163/340: Use buttercup--specs where possible, (continued)
- [nongnu] elpa/buttercup bcaa7f0 163/340: Use buttercup--specs where possible, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 61ebe91 171/340: Update README.md, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 39d625c 173/340: Bump version: 1.11 → 1.12, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 6330610 176/340: Add more markdown running functions, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 3d3aff9 178/340: Set file local code-style variables in test-buttercup.el, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 553529f 181/340: Remove obsolete buttercup-xdescribe, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 5821cd0 184/340: Merge pull request #131 from snogge/markdown, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a394fea 191/340: Bump version: 1.13 → 1.14, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 7cea4c6 192/340: Test buttercup-run, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b410c78 193/340: Separate return code from reporter, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 9b230dc 202/340: Fix the "should print the elapsed time for all specs" test,
ELPA Syncer <=
- [nongnu] elpa/buttercup 9d172a7 205/340: Merge pull request #145 from snogge/test-fixes, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c100fad 210/340: Implement buttercup-suppress-warning-capture, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c994aea 212/340: Add LICENSE file., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d9ce620 213/340: Merge branch 'license-file' into master, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 49f01fc 219/340: Merge branch 'master' into test-emacs-26.3, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 25462dd 223/340: Record calls to spied-on functions that throw errors, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bf48137 224/340: Add some tests for error-call recording, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup fc19598 225/340: Add examples for checking return value and thrown signal of a spy, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 6590360 226/340: Fix a few typos and other small errors, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8a28489 230/340: Bump version: 1.18 → 1.19, ELPA Syncer, 2021/12/16