MCPcopy Index your code
hub / github.com/deployd/deployd / doAsserts

Function doAsserts

test-app/public/test/clientlib.test.js:18–34  ·  view source on GitHub ↗
(serverUrl, done)

Source from the content-addressed store, hash-verified

16 });
17
18 function doAsserts(serverUrl, done) {
19 sandbox.useFakeServer();
20 sandbox.server.respondWith(serverUrl + '/hello', [200, { "Content-Type": "application/json" }, '{ "ok": true }']);
21 sandbox.server.autoRespond = true;
22 sandbox.stub(io, "connect").returns({ on: function() {} });
23
24 dpd.on('test', function(){
25 // used to force socket.io to connect
26 });
27
28 dpd('/hello').get(function (res, err) {
29 expect(res).to.exist;
30 expect(res.ok).to.be.true;
31 expect(io.connect.calledWith(serverUrl)).to.be.true;
32 done();
33 });
34 }
35
36 it('should allow overriding server root via setBaseUrl', function(done) {
37 dpd.setBaseUrl('http://the-api-is-here.domain.api:22');

Callers 1

clientlib.test.jsFile · 0.85

Calls 1

doneFunction · 0.50

Tested by

no test coverage detected