This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let AjaxService = { | |
addNewMember(memberName, orderId) { | |
return $.ajax({ | |
url: "/group_order_members", | |
method: "POST", | |
dataType: "json", | |
data: { | |
group_order_member: { | |
name: memberName, | |
group_order_id: orderId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val eventuallyFoo = ServiceOne.get // can be fired in parallel | |
val eventuallyBar = ServiceTwo.get | |
for { | |
foo <- eventuallyFoo | |
bar <- eventuallyBar | |
baz <- DB.get(foo.id, bar.id) | |
} yield baz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http.request(options, response => { | |
let body = []; | |
if (response.statusCode < 200 || response.statusCode >= 400) { | |
reject('HTTP ' + response.statusCode); | |
} | |
response | |
.on('data', chunk => { | |
body.push(chunk); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ Response 200 (application/json) | |
+ Schema | |
# OptionBasePrimitives | |
+ aString (string) | |
+ aChar (string) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
class Foo { | |
get bar() { | |
return 'baz'; | |
} | |
} | |
foo.bar = 'bazola'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Foo', function () { | |
describe('foo#bar', function () { | |
it('should do some thing', function () { | |
}); | |
}); | |
describe('foo#bar', function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class FooTest extends PHPUnit_Framework_Test | |
{ | |
// general setup shit | |
} | |
class Foo_BarTest extends FooTest | |
{ | |
/** | |
* @test | |
*/ |