mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-03 07:45:21 +00:00
Disable logAll in headless mode (#1673)
Enabling logAll in just one test has the capacity to overwhelm the CI with log output, so we disable it if the webdriver is automated.
This commit is contained in:
parent
c126d90588
commit
bfd7965dec
@ -183,15 +183,6 @@ describe("Core htmx API test", function(){
|
||||
div3.classList.contains("foo").should.equal(true);
|
||||
});
|
||||
|
||||
it('logAll and logNone works', function () {
|
||||
var initialLogger = htmx.logger
|
||||
htmx.logAll();
|
||||
htmx.logger.should.not.equal(null);
|
||||
htmx.logNone();
|
||||
should.equal(htmx.logger, null);
|
||||
htmx.logger = initialLogger;
|
||||
});
|
||||
|
||||
it('eval can be suppressed', function () {
|
||||
var calledEvent = false;
|
||||
var handler = htmx.on("htmx:evalDisallowedError", function(){
|
||||
|
@ -35,6 +35,13 @@
|
||||
<script src="../node_modules/sinon/pkg/sinon.js"></script>
|
||||
<script src="../node_modules/mock-socket/dist/mock-socket.js"></script>
|
||||
<script src="../src/htmx.js"></script>
|
||||
<script>
|
||||
// Do not log all the events in headless mode (the log output is enormous)
|
||||
if (navigator.webdriver) {
|
||||
htmx.logAll = function () { }
|
||||
}
|
||||
</script>
|
||||
|
||||
<script class="mocha-init">
|
||||
mocha.setup('bdd');
|
||||
mocha.checkLeaks();
|
||||
|
Loading…
x
Reference in New Issue
Block a user