[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 79286cf 055/340: Test for the batch reporter.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 79286cf 055/340: Test for the batch reporter. |
Date: |
Thu, 16 Dec 2021 14:59:03 -0500 (EST) |
branch: elpa/buttercup
commit 79286cf70650cdc9b5e01d20a7e6428fc8f63fad
Author: Jorgen Schaefer <contact@jorgenschaefer.de>
Commit: Jorgen Schaefer <contact@jorgenschaefer.de>
Test for the batch reporter.
---
buttercup-test.el | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/buttercup-test.el b/buttercup-test.el
index 6d2ebd3..22b750c 100644
--- a/buttercup-test.el
+++ b/buttercup-test.el
@@ -472,3 +472,53 @@
(expect (lambda () (test-function 1 2))
:to-throw
'error "Stubbed error")))))
+
+;;;;;;;;;;;;;
+;;; Reporters
+
+(describe "The batch reporter"
+ (let (parent-suite child-suite spec)
+ (before-each
+ (setq parent-suite (make-buttercup-suite :description "parent-suite")
+ child-suite (make-buttercup-suite :description "child-suite")
+ spec (make-buttercup-spec :description "spec"))
+ (buttercup-suite-add-child parent-suite child-suite)
+ (buttercup-suite-add-child child-suite spec)
+ (spy-on 'message))
+
+ (it "should handle the start event"
+ (buttercup-reporter-batch 'buttercup-started nil))
+
+ (it "should emit an indented suite description on suite start"
+ (buttercup-reporter-batch 'suite-started child-suite)
+
+ (expect 'message
+ :to-have-been-called-with
+ "%s%s"
+ " "
+ "child-suite"))
+
+ (it "should emit an indented spec description on spec start"
+ (buttercup-reporter-batch 'spec-started spec)
+
+ (expect 'message
+ :to-have-been-called-with
+ "%s%s"
+ " "
+ "spec"))
+
+ (it "should handle the spec done event"
+ (buttercup-reporter-batch 'spec-done spec))
+
+ (it "should emit a newline at the end of the top-level suite"
+ (buttercup-reporter-batch 'suite-done parent-suite)
+
+ (expect 'message :to-have-been-called-with ""))
+
+ (it "should not emit anything at the end of other suites"
+ (buttercup-reporter-batch 'suite-done child-suite)
+
+ (expect 'message :not :to-have-been-called))
+
+ (it "should handle the end event"
+ (buttercup-reporter-batch 'buttercup-done nil))))
- [nongnu] elpa/buttercup 2bc55fe 201/340: Add emacs-26.2 to CI config, (continued)
- [nongnu] elpa/buttercup 2bc55fe 201/340: Add emacs-26.2 to CI config, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup debe7cc 204/340: Merge pull request #144 from kevinjfoley/support-var-star, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c2d75e9 209/340: Bump version: 1.17 → 1.18, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bb3fba3 227/340: Properly handle return values and thrown signals in spies, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a970d10 228/340: Implement spy-calls-count-returned and spy-calls-count-errors, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8d91893 232/340: Optimize spy-calls-count-errors and spy-calls-count-returned, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 83141f7 243/340: Raise an error if spy-on is used in the wrong context, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 16e3530 090/340: Also update Makefile to the new docs names, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 794afbf 114/340: Merge pull request #65 from DamienCassou/patch-1, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d5c9a19 120/340: Make --with-cleanup public so spies can be used without specs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 79286cf 055/340: Test for the batch reporter.,
ELPA Syncer <=
- [nongnu] elpa/buttercup 87e0c0d 073/340: Bump version: 1.0 → 1.1, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 10e0537 150/340: Manually fix bumpversion.cfg, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 18a8879 151/340: Bump version: 1.8 → 1.9, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 62c416a 164/340: Rewrite the pattern loop of buttercup-run-discover, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 636db47 172/340: Typo fixes (#126), ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8034597 175/340: Replace remaining calls to obsolete buttercup-*-parents, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f57036f 180/340: Update the disabled/pending sections of writing-tests.md, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 406c41d 190/340: Print elapsed time for each spec, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 19f256e 094/340: Update copyright / license information for some details, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 46882f8 131/340: Show a message about duplicate spec names, ELPA Syncer, 2021/12/16