Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("accepts an agent instance", function(done) {
const agent = new http.Agent({});
const client = createClient(
"http://localhost:" + createServer.test.port + "/webdav/server",
{
username: createServer.test.username,
password: createServer.test.password,
httpAgent: agent
}
);
client.readdir("/", (err, contents) => {
expect(err).to.be.null;
expect(contents).to.have.lengthOf(4);
done();
});
});
});
it("accepts an agent instance", function(done) {
const agent = new http.Agent({});
const client = createClient(
"http://localhost:" + createServer.test.port + "/webdav/server",
{
username: createServer.test.username,
password: createServer.test.password,
httpAgent: agent
}
);
client.readdir("/", (err, contents) => {
expect(err).to.be.null;
expect(contents).to.have.lengthOf(4);
done();
});
});
});
function createWebDAVClient() {
return createClient(
"http://localhost:" + createServer.test.port + "/webdav/server",
{
username: createServer.test.username,
password: createServer.test.password
}
)
}
function createWebDAVClient() {
return createClient(
"http://localhost:" + createServer.test.port + "/webdav/server",
{
username: createServer.test.username,
password: createServer.test.password
}
)
}