
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
mock-pointdns
Advanced tools
Mocks of the PointDNS API for use in local testing. See https://pointhq.com/api/docs
Helps integrate with the PointDNS API through acceptance testing.
git clone https://github.com/codesleuth/mock-pointdns && cd mock-pointdns
npm install
To use the mock server in testing, take a look at the following example:
var mockpointdns = require('mock-pointdns'),
request = require('supertest');
describe('Verify Mock PointDNS Server', function () {
var apitoken;
var zone;
var mockServer;
var mockServerUrl;
before(function (done) {
apitoken = mockpointdns.setApiToken();
zone = mockpointdns.addZone();
mockServer = mockpointdns.app.listen(process.env.PORT, process.env.IP, function () {
mockServerUrl = 'http://' + process.env.IP + ':' + process.env.PORT;
done();
});
});
it('/zones should return the expected zone', function (done) {
request(mockServerUrl)
.get('/zones')
.auth('', apitoken)
.expect(200)
.expect([{ zone: zone }])
.end(done);
});
after(function (done) {
mockServer.close(done);
});
});
npm start
will launch a sample app that shows how to configure and use this mock server.
npm test
will run the test suite using Mocha which is required as a development dependency.
This mock server is not controlled or endorsed by Copper.io in any way. The implementation may differ and may even be outdated right now. This project was intended to help mock out the expected behaviour of the PointDNS API according to the API documentation.
If you wish to contribute, pull requests are welcome. Keeping this project up to date with the API it mocks out is key to its usefulness. Please contribute!
FAQs
Mocks of the PointDNS API for use in local testing. See https://pointhq.com/api/docs
We found that mock-pointdns demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.