mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-03 07:45:21 +00:00
add regression test for https://github.com/bigskysoftware/htmx/issues/427
This commit is contained in:
parent
a5c24a3f35
commit
6503e29832
@ -61,6 +61,19 @@ describe("Core htmx AJAX headers", function () {
|
|||||||
invokedEvent.should.equal(true);
|
invokedEvent.should.equal(true);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("should handle dot path HX-Trigger response header properly", function () {
|
||||||
|
this.server.respondWith("GET", "/test", [200, {"HX-Trigger": "foo.bar"}, ""]);
|
||||||
|
|
||||||
|
var div = make('<div hx-get="/test"></div>');
|
||||||
|
var invokedEvent = false;
|
||||||
|
div.addEventListener("foo.bar", function (evt) {
|
||||||
|
invokedEvent = true;
|
||||||
|
});
|
||||||
|
div.click();
|
||||||
|
this.server.respond();
|
||||||
|
invokedEvent.should.equal(true);
|
||||||
|
})
|
||||||
|
|
||||||
it("should handle simple string HX-Trigger response header in different case properly", function () {
|
it("should handle simple string HX-Trigger response header in different case properly", function () {
|
||||||
this.server.respondWith("GET", "/test", [200, {"hx-trigger": "foo"}, ""]);
|
this.server.respondWith("GET", "/test", [200, {"hx-trigger": "foo"}, ""]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user