report.test.js — fastify Source File
Architecture documentation for report.test.js, a javascript file in the fastify codebase.
Entity Profile
Source Code
'use strict'
const { test } = require('node:test')
const fastify = require('../../fastify')()
fastify.addHttpMethod('REPORT', { hasBody: true })
const bodySample = `<?xml version="1.0" encoding="UTF-8"?>
<B:calendar-query xmlns:B="urn:ietf:params:xml:ns:caldav">
<A:prop xmlns:A="DAV:">
<A:getetag/>
<A:getcontenttype/>
</A:prop>
<B:filter>
<B:comp-filter name="VCALENDAR">
<B:comp-filter name="VEVENT">
<B:time-range start="20170215T000000Z"/>
</B:comp-filter>
</B:comp-filter>
</B:filter>
</B:calendar-query>
`
test('can be created - report', (t) => {
t.plan(1)
try {
fastify.route({
method: 'REPORT',
url: '*',
handler: function (req, reply) {
return reply.code(207).send(`<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response xmlns:lp1="DAV:">
<D:href>/</D:href>
<D:propstat>
<D:prop>
<lp1:resourcetype>
<D:collection/>
</lp1:resourcetype>
<lp1:creationdate>2022-04-13T12:35:30Z</lp1:creationdate>
<lp1:getlastmodified>Wed, 13 Apr 2022 12:35:30 GMT</lp1:getlastmodified>
<lp1:getetag>"e0-5dc8869b53ef1"</lp1:getetag>
<D:supportedlock>
<D:lockentry>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:locktype>
<D:write/>
</D:locktype>
</D:lockentry>
<D:lockentry>
<D:lockscope>
<D:shared/>
</D:lockscope>
<D:locktype>
<D:write/>
</D:locktype>
</D:lockentry>
</D:supportedlock>
<D:lockdiscovery/>
// ... (83 more lines)
Source
Frequently Asked Questions
What does report.test.js do?
report.test.js is a source file in the fastify codebase, written in javascript.
Where is report.test.js in the architecture?
report.test.js is located at test/http-methods/report.test.js (directory: test/http-methods).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free