Skip to content

Commit

Permalink
Refactoring Launchpad and Transport tests to work with Node.
Browse files Browse the repository at this point in the history
  • Loading branch information
henvic committed Dec 22, 2015
1 parent 770545d commit 0c3bc0d
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 188 deletions.
10 changes: 10 additions & 0 deletions src/api/Launchpad.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import ClientRequest from './ClientRequest';
import Ajax from 'bower:metal-ajax/src/Ajax';
import MultiMap from 'bower:metal-multimap/src/MultiMap';

var io;

/**
* The main class for making api requests. Sending requests returns a promise that is
* resolved when the response arrives. Usage example:
Expand Down Expand Up @@ -439,6 +441,14 @@ class Launchpad {
return transport.send(clientRequest).then(this.decode);
}

/**
* Sets the socket transport
* @param {Object} socket implementation object.
*/
static socket(socket) {
io = socket;
}

/**
* Adds a sort query to this request's body.
* @param {string} field The field that the query should be sorted by.
Expand Down
Loading

0 comments on commit 0c3bc0d

Please sign in to comment.