Debian Codegraph @

test/tests/attributes/hx-put.js

raw symbols SCIP
1 describe('hx-put attribute', function() {
2
3 beforeEach(() => {
4 setupTest(this.currentTest)
5 })
6
7 afterEach(() => {
8 cleanupTest(this.currentTest)
9 })
10
11 it('issues a PUT request', async function() {
12 mockResponse('PUT', '/test', 'Put!')
13 let btn = createProcessedHTML('<button hx-put="/test">Click Me!</button>')
14 btn.click()
15 await forRequest()
16 fetchMock.calls[0].request.method.should.equal('PUT');
17 btn.innerHTML.should.equal('Put!')
18 })
19
20 })