id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
mojotech/pioneer:test/integration/steps/steps.coffee:1:completion
completion
expect = require("chai").expect module.exports = -> @Given /^The region "([^"]*)" with a ui element "([^"]*)" containing "([^"]*)"$/, (regionSelector, uiName, contents) -> new @Widget.View({ regionPath: regionSelector }).ui(uiName) .then (elm) -> elm.getText() .should.eventually.eql con...
@Given /^a widget\.view without a regionName should fail$/, -> expect(@Widget.View).to.throw("A Widget.View requires regionPath") @Given /^a widget\.view ui lookup without a selector should fail$/, -> widget = new @Widget.View({ regionPath: "wow" }) expect(-> widget.ui()).to.throw("A UI select...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
90d4a66a885bab106437ace7e6774d70965c75df
523
https://github.com/mojotech/pioneer/blob/90d4a66a885bab106437ace7e6774d70965c75df/test/integration/steps/steps.coffee
1
38
mojotech/pioneer:test/integration/steps/steps.coffee:1:raw_corpus
raw_corpus
expect = require("chai").expect module.exports = -> @Given /^The region "([^"]*)" with a ui element "([^"]*)" containing "([^"]*)"$/, (regionSelector, uiName, contents) -> new @Widget.View({ regionPath: regionSelector }).ui(uiName) .then (elm) -> elm.getText() .should.eventually.eql con...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
fc9304277372b1bf3022de1d5ab687f79bbcbeb7
523
https://github.com/mojotech/pioneer/blob/fc9304277372b1bf3022de1d5ab687f79bbcbeb7/test/integration/steps/steps.coffee
1
38
mojotech/pioneer:test/integration/steps/steps.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript expect = require("chai").expect module.exports = -> @Given /^The region "([^"]*)" with a ui element "([^"]*)" containing "([^"]*)"$/, (regionSelector, uiName, contents) -> new @Widget.View({ regionPath: regionSelector }).ui(uiName) .then (elm...
var expect; expect = require("chai").expect; module.exports = function() { this.Given(/^The region "([^"]*)" with a ui element "([^"]*)" containing "([^"]*)"$/, function(regionSelector, uiName, contents) { return new this.Widget.View({ regionPath: regionSelector }).ui(uiName).then(function(elm) { ...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
fc9304277372b1bf3022de1d5ab687f79bbcbeb7
523
https://github.com/mojotech/pioneer/blob/fc9304277372b1bf3022de1d5ab687f79bbcbeb7/test/integration/steps/steps.coffee
1
38
mojotech/pioneer:test/integration/steps/steps.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var expect; expect = require("chai").expect; module.exports = function() { this.Given(/^The region "([^"]*)" with a ui element "([^"]*)" containing "([^"]*)"$/, function(regionSelector, uiName, contents) { return new this.Widget.View({ regionPath: reg...
expect = require("chai").expect module.exports = -> @Given /^The region "([^"]*)" with a ui element "([^"]*)" containing "([^"]*)"$/, (regionSelector, uiName, contents) -> new @Widget.View({ regionPath: regionSelector }).ui(uiName) .then (elm) -> elm.getText() .should.eventually.eql con...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
fc9304277372b1bf3022de1d5ab687f79bbcbeb7
523
https://github.com/mojotech/pioneer/blob/fc9304277372b1bf3022de1d5ab687f79bbcbeb7/test/integration/steps/steps.coffee
1
38
mojotech/pioneer:test/integration/steps/steps.coffee:1:completion
completion
expect = require("chai").expect module.exports = -> @Given /^The region "([^"]*)" with a ui element "([^"]*)" containing "([^"]*)"$/, (regionSelector, uiName, contents) -> new @Widget.View({ regionPath: regionSelector }).ui(uiName) .then (elm) -> elm.getText() .should.eventually.eql con...
@Given /^a widget\.view without a regionName should fail$/, -> expect(@Widget.View).to.throw("A Widget.View requires regionPath") @Given /^a widget\.view ui lookup without a selector should fail$/, -> widget = new @Widget.View({ regionPath: "wow" }) expect(-> widget.ui()).to.throw("A UI select...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
fc9304277372b1bf3022de1d5ab687f79bbcbeb7
523
https://github.com/mojotech/pioneer/blob/fc9304277372b1bf3022de1d5ab687f79bbcbeb7/test/integration/steps/steps.coffee
1
38
mojotech/pioneer:test/integration/steps/steps.coffee:1:raw_corpus
raw_corpus
module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, (child, parent, content) -> base = new ...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
3
52
mojotech/pioneer:test/integration/steps/steps.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see...
module.exports = function() { this.When(/^I read the "([^"]*)" I should see "([^"]*)"$/, function(selector, content) { return new this.Widget({ root: selector }).read().should.eventually.eql(content); }); this.When(/^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, function(ch...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
3
52
mojotech/pioneer:test/integration/steps/steps.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function() { this.When(/^I read the "([^"]*)" I should see "([^"]*)"$/, function(selector, content) { return new this.Widget({ root: selector }).read().should.eventually.eql(content); }); this.When(/^I find the "([^"]*)" element...
module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, (child, parent, content) -> base = new ...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
3
52
mojotech/pioneer:test/integration/steps/steps.coffee:1:completion
completion
module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, (child, parent, content) -> base = new ...
}).ui(uiName) .then (elm) -> elm.getText() .should.eventually.eql contents @Given /^The app "([^"]*)" should have the region "([^"]*)" with a ui element "([^"]*)" containing "([^"]*)"$/, (appPath, regionSelector, uiName, contents) -> new @Widget.View({ regionPath: regionSelector appPa...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
3
52
mojotech/pioneer:test/integration/steps/steps.coffee:2:raw_corpus
raw_corpus
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
53
102
mojotech/pioneer:test/integration/steps/steps.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content)...
this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); this.When(/^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, function(selector, content) { var allCaps; allCaps = f...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
53
102
mojotech/pioneer:test/integration/steps/steps.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); this.When(/^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, fun...
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
53
102
mojotech/pioneer:test/integration/steps/steps.coffee:2:completion
completion
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
@When /^I see if "([^"]*)" is visible I should get "([^"]*)"$/, (selector,found) -> new @Widget({ root: selector }) .isVisible() .then (isFound) -> (isFound+"").should.eql(found) @When /^I read the "([^"]*)" attribute I should get "([^"]*)"$/, (attribute, expected) -> new @Widget({ ro...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
53
102
mojotech/pioneer:test/integration/steps/steps.coffee:3:raw_corpus
raw_corpus
.getText(child) .then (text) -> text.should.eql(expected) @When /^I send "([^"]*)" to an element I should be able to read "([^"]*)"$/, (sent, read) -> w = new @Widget({ root: ".inputbox" }) w.sendKeys(sent) .then -> w.read().should.eventually.eql(read) @When /^I fill an input with...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
103
152
mojotech/pioneer:test/integration/steps/steps.coffee:3:completion
completion
.getText(child) .then (text) -> text.should.eql(expected) @When /^I send "([^"]*)" to an element I should be able to read "([^"]*)"$/, (sent, read) -> w = new @Widget({ root: ".inputbox" }) w.sendKeys(sent) .then -> w.read().should.eventually.eql(read) @When /^I fill an input with...
.getInnerHTML().then (html) -> html.trim().should.eql(expected) @When /^I get the outerHTML of "([^"]*)" I should get "([^"]*)"$/, (rootSelector, expected) -> new @Widget({ root: rootSelector }) .getOuterHTML().then (html) -> html.split('\n').map((string) -> string.trim() ...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
103
152
mojotech/pioneer:test/integration/steps/steps.coffee:4:raw_corpus
raw_corpus
attribute.indexOf(expected).should.not.eql(-1) @When /^I remove class "([^"]*)" from "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .removeClass(className) @Then /^"([^"]*)" should not have class "([^"]*)"$/, (selector, expected) -> new @Widget({ root: selector ...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
153
173
mojotech/pioneer:test/integration/steps/steps.coffee:4:completion
completion
attribute.indexOf(expected).should.not.eql(-1) @When /^I remove class "([^"]*)" from "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .removeClass(className) @Then /^"([^"]*)" should not have class "([^"]*)"$/, (selector, expected) -> new @Widget({
root: selector }) .getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1) @When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className)
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
46dc67df9c9fe622df5596dca34d927e95ad0f53
523
https://github.com/mojotech/pioneer/blob/46dc67df9c9fe622df5596dca34d927e95ad0f53/test/integration/steps/steps.coffee
153
173
mojotech/pioneer:test/integration/steps/steps.coffee:3:raw_corpus
raw_corpus
.getText(child) .then (text) -> text.should.eql(expected) @When /^I send "([^"]*)" to an element I should be able to read "([^"]*)"$/, (sent, read) -> w = new @Widget({ root: ".inputbox" }) w.sendKeys(sent) .then -> w.read().should.eventually.eql(read) @When /^I fill an input with...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
e3bbc4ff2b8c6850072453fc53613ccd9c01008b
523
https://github.com/mojotech/pioneer/blob/e3bbc4ff2b8c6850072453fc53613ccd9c01008b/test/integration/steps/steps.coffee
103
139
mojotech/pioneer:test/integration/steps/steps.coffee:3:completion
completion
.getText(child) .then (text) -> text.should.eql(expected) @When /^I send "([^"]*)" to an element I should be able to read "([^"]*)"$/, (sent, read) -> w = new @Widget({ root: ".inputbox" }) w.sendKeys(sent) .then -> w.read().should.eventually.eql(read) @When /^I fill an input with...
.then -> w.read().should.eventually.eql(read) @When /^I get the innerHTML of "([^"]*)" I should get "([^"]*)"$/, (rootSelector, expected) -> new @Widget({ root: rootSelector }) .getInnerHTML().then (html) -> html.trim().should.eql(expected) @When /^I get the outerHTML of "([^"]*)" I ...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
e3bbc4ff2b8c6850072453fc53613ccd9c01008b
523
https://github.com/mojotech/pioneer/blob/e3bbc4ff2b8c6850072453fc53613ccd9c01008b/test/integration/steps/steps.coffee
103
139
mojotech/pioneer:test/integration/steps/steps.coffee:3:raw_corpus
raw_corpus
.getText(child) .then (text) -> text.should.eql(expected) @When /^I send "([^"]*)" to an element I should be able to read "([^"]*)"$/, (sent, read) -> w = new @Widget({ root: ".inputbox" }) w.sendKeys(sent) .then -> w.read().should.eventually.eql(read) @When /^I fill an input with...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
19a289879b68d86948075327931769392603eabf
523
https://github.com/mojotech/pioneer/blob/19a289879b68d86948075327931769392603eabf/test/integration/steps/steps.coffee
103
122
mojotech/pioneer:test/integration/steps/steps.coffee:3:completion
completion
.getText(child) .then (text) -> text.should.eql(expected) @When /^I send "([^"]*)" to an element I should be able to read "([^"]*)"$/, (sent, read) -> w = new @Widget({ root: ".inputbox" }) w.sendKeys(sent) .then ->
w.read().should.eventually.eql(read) @When /^I fill an input with "([^"]*)" I should get "([^"]*)"$/, (write, read) -> w = new @Widget({ root: '.inputbox' }) w.fill(write) .then -> w.read().should.eventually.eql(read)
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
19a289879b68d86948075327931769392603eabf
523
https://github.com/mojotech/pioneer/blob/19a289879b68d86948075327931769392603eabf/test/integration/steps/steps.coffee
103
122
mojotech/pioneer:test/integration/steps/steps.coffee:2:raw_corpus
raw_corpus
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
b532b1675929689b7af28840e0dd5bb62922d72c
523
https://github.com/mojotech/pioneer/blob/b532b1675929689b7af28840e0dd5bb62922d72c/test/integration/steps/steps.coffee
53
102
mojotech/pioneer:test/integration/steps/steps.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content)...
this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); this.When(/^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, function(selector, content) { var allCaps; allCaps = f...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
b532b1675929689b7af28840e0dd5bb62922d72c
523
https://github.com/mojotech/pioneer/blob/b532b1675929689b7af28840e0dd5bb62922d72c/test/integration/steps/steps.coffee
53
102
mojotech/pioneer:test/integration/steps/steps.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); this.When(/^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, fun...
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
b532b1675929689b7af28840e0dd5bb62922d72c
523
https://github.com/mojotech/pioneer/blob/b532b1675929689b7af28840e0dd5bb62922d72c/test/integration/steps/steps.coffee
53
102
mojotech/pioneer:test/integration/steps/steps.coffee:2:completion
completion
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
@When /^I see if "([^"]*)" is visible I should get "([^"]*)"$/, (selector,found) -> new @Widget({ root: selector }) .isVisible() .then (isFound) -> (isFound+"").should.eql(found) @When /^I read the "([^"]*)" attribute I should get "([^"]*)"$/, (attribute, expected) -> new @Widget({ ro...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
b532b1675929689b7af28840e0dd5bb62922d72c
523
https://github.com/mojotech/pioneer/blob/b532b1675929689b7af28840e0dd5bb62922d72c/test/integration/steps/steps.coffee
53
102
mojotech/pioneer:test/integration/steps/steps.coffee:3:raw_corpus
raw_corpus
.getText(child) .then (text) -> text.should.eql(expected) @When /^I send "([^"]*)" to an element I should be able to read "([^"]*)"$/, (sent, read) -> w = new @Widget({ root: ".inputbox" }) w.sendKeys(sent) .then -> w.read().should.eventually.eql(read)
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
a0cc032cb2a88011a90db215b6788df26aa4bc6e
523
https://github.com/mojotech/pioneer/blob/a0cc032cb2a88011a90db215b6788df26aa4bc6e/test/integration/steps/steps.coffee
103
113
mojotech/pioneer:test/integration/steps/steps.coffee:3:completion
completion
.getText(child) .then (text) -> text.should.eql(expected) @When /^I send "([^"]*)" to an element I should be able to read "([^"]*)"$/, (sent, read) -> w = new @Widget({
root: ".inputbox" }) w.sendKeys(sent) .then -> w.read().should.eventually.eql(read)
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
a0cc032cb2a88011a90db215b6788df26aa4bc6e
523
https://github.com/mojotech/pioneer/blob/a0cc032cb2a88011a90db215b6788df26aa4bc6e/test/integration/steps/steps.coffee
103
113
mojotech/pioneer:test/integration/steps/steps.coffee:2:raw_corpus
raw_corpus
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
bb3ec9c99a08db0582e1d0777fd986cd387c6f9c
523
https://github.com/mojotech/pioneer/blob/bb3ec9c99a08db0582e1d0777fd986cd387c6f9c/test/integration/steps/steps.coffee
53
90
mojotech/pioneer:test/integration/steps/steps.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content)...
this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); this.When(/^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, function(selector, content) { var allCaps; allCaps = f...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
bb3ec9c99a08db0582e1d0777fd986cd387c6f9c
523
https://github.com/mojotech/pioneer/blob/bb3ec9c99a08db0582e1d0777fd986cd387c6f9c/test/integration/steps/steps.coffee
53
90
mojotech/pioneer:test/integration/steps/steps.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); this.When(/^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, fun...
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
bb3ec9c99a08db0582e1d0777fd986cd387c6f9c
523
https://github.com/mojotech/pioneer/blob/bb3ec9c99a08db0582e1d0777fd986cd387c6f9c/test/integration/steps/steps.coffee
53
90
mojotech/pioneer:test/integration/steps/steps.coffee:2:completion
completion
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
}) .findByText(search).then( (el) -> el.getText() ) .should.eventually.eql(found) @When /^I see if "([^"]*)" is visible I should get "([^"]*)"$/, (selector,found) -> new @Widget({ root: selector }) .isVisible() .then (isFound) -> (isFound+"").should.eql(found) @When /^I rea...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
bb3ec9c99a08db0582e1d0777fd986cd387c6f9c
523
https://github.com/mojotech/pioneer/blob/bb3ec9c99a08db0582e1d0777fd986cd387c6f9c/test/integration/steps/steps.coffee
53
90
mojotech/pioneer:test/integration/steps/steps.coffee:2:raw_corpus
raw_corpus
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
1f340e661718dcbb88e6d2ddec737bb3c8914137
523
https://github.com/mojotech/pioneer/blob/1f340e661718dcbb88e6d2ddec737bb3c8914137/test/integration/steps/steps.coffee
53
83
mojotech/pioneer:test/integration/steps/steps.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content)...
this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); this.When(/^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, function(selector, content) { var allCaps; allCaps = f...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
1f340e661718dcbb88e6d2ddec737bb3c8914137
523
https://github.com/mojotech/pioneer/blob/1f340e661718dcbb88e6d2ddec737bb3c8914137/test/integration/steps/steps.coffee
53
83
mojotech/pioneer:test/integration/steps/steps.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); this.When(/^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, fun...
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
1f340e661718dcbb88e6d2ddec737bb3c8914137
523
https://github.com/mojotech/pioneer/blob/1f340e661718dcbb88e6d2ddec737bb3c8914137/test/integration/steps/steps.coffee
53
83
mojotech/pioneer:test/integration/steps/steps.coffee:2:completion
completion
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
@Given /^I search for "([^"]*)" I should get "([^"]*)"$/, (search, found) -> new @Widget({ root: "doge" }) .findByText(search).then( (el) -> el.getText() ) .should.eventually.eql(found) @When /^I see if "([^"]*)" is visible I should get "([^"]*)"$/, (selector,found) -> new @Widget...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
1f340e661718dcbb88e6d2ddec737bb3c8914137
523
https://github.com/mojotech/pioneer/blob/1f340e661718dcbb88e6d2ddec737bb3c8914137/test/integration/steps/steps.coffee
53
83
mojotech/pioneer:test/integration/steps/steps.coffee:2:raw_corpus
raw_corpus
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
fb62507fc966f06fde956abf76bace9a57ae2653
523
https://github.com/mojotech/pioneer/blob/fb62507fc966f06fde956abf76bace9a57ae2653/test/integration/steps/steps.coffee
53
81
mojotech/pioneer:test/integration/steps/steps.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content)...
this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); this.When(/^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, function(selector, content) { var allCaps; allCaps = f...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
fb62507fc966f06fde956abf76bace9a57ae2653
523
https://github.com/mojotech/pioneer/blob/fb62507fc966f06fde956abf76bace9a57ae2653/test/integration/steps/steps.coffee
53
81
mojotech/pioneer:test/integration/steps/steps.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); this.When(/^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, fun...
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
fb62507fc966f06fde956abf76bace9a57ae2653
523
https://github.com/mojotech/pioneer/blob/fb62507fc966f06fde956abf76bace9a57ae2653/test/integration/steps/steps.coffee
53
81
mojotech/pioneer:test/integration/steps/steps.coffee:2:completion
completion
@Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Wid...
.should.eventually.eql(content) @Given /^I search for "([^"]*)" I should get "([^"]*)"$/, (search, found) -> new @Widget({ root: "wow" }) .findByText(search).getText() .should.eventually.eql(found) @When /^I see if "([^"]*)" is visible I should get "([^"]*)"$/, (selector,found) -> new @W...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
fb62507fc966f06fde956abf76bace9a57ae2653
523
https://github.com/mojotech/pioneer/blob/fb62507fc966f06fde956abf76bace9a57ae2653/test/integration/steps/steps.coffee
53
81
mojotech/pioneer:test/integration/steps/steps.coffee:1:raw_corpus
raw_corpus
expect = require("chai").expect module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, (child, pa...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
5190e93c15f8aaac246012ce47d110d687400b9d
523
https://github.com/mojotech/pioneer/blob/5190e93c15f8aaac246012ce47d110d687400b9d/test/integration/steps/steps.coffee
1
50
mojotech/pioneer:test/integration/steps/steps.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript expect = require("chai").expect module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" elem...
var expect; expect = require("chai").expect; module.exports = function() { this.When(/^I read the "([^"]*)" I should see "([^"]*)"$/, function(selector, content) { return new this.Widget({ root: selector }).read().should.eventually.eql(content); }); this.When(/^I find the "([^"]*)" element within ...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
5190e93c15f8aaac246012ce47d110d687400b9d
523
https://github.com/mojotech/pioneer/blob/5190e93c15f8aaac246012ce47d110d687400b9d/test/integration/steps/steps.coffee
1
50
mojotech/pioneer:test/integration/steps/steps.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var expect; expect = require("chai").expect; module.exports = function() { this.When(/^I read the "([^"]*)" I should see "([^"]*)"$/, function(selector, content) { return new this.Widget({ root: selector }).read().should.eventually.eql(content); ...
expect = require("chai").expect module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, (child, pa...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
5190e93c15f8aaac246012ce47d110d687400b9d
523
https://github.com/mojotech/pioneer/blob/5190e93c15f8aaac246012ce47d110d687400b9d/test/integration/steps/steps.coffee
1
50
mojotech/pioneer:test/integration/steps/steps.coffee:1:completion
completion
expect = require("chai").expect module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, (child, pa...
new @Widget.View({ regionPath: regionSelector }).ui(uiName) .then (elm) -> elm.getText() .should.eventually.eql contents @Given /^The app "([^"]*)" should have the region "([^"]*)" with a ui element "([^"]*)" containing "([^"]*)"$/, (appPath, regionSelector, uiName, contents) -> new @Wi...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
5190e93c15f8aaac246012ce47d110d687400b9d
523
https://github.com/mojotech/pioneer/blob/5190e93c15f8aaac246012ce47d110d687400b9d/test/integration/steps/steps.coffee
1
50
mojotech/pioneer:test/integration/steps/steps.coffee:2:raw_corpus
raw_corpus
@When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps ...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
5190e93c15f8aaac246012ce47d110d687400b9d
523
https://github.com/mojotech/pioneer/blob/5190e93c15f8aaac246012ce47d110d687400b9d/test/integration/steps/steps.coffee
51
74
mojotech/pioneer:test/integration/steps/steps.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isP...
this.When(/^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, function(child, root, isPresent) { return this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); }); ...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
5190e93c15f8aaac246012ce47d110d687400b9d
523
https://github.com/mojotech/pioneer/blob/5190e93c15f8aaac246012ce47d110d687400b9d/test/integration/steps/steps.coffee
51
74
mojotech/pioneer:test/integration/steps/steps.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.When(/^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, function(child, root, isPresent) { return this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { ret...
@When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps ...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
5190e93c15f8aaac246012ce47d110d687400b9d
523
https://github.com/mojotech/pioneer/blob/5190e93c15f8aaac246012ce47d110d687400b9d/test/integration/steps/steps.coffee
51
74
mojotech/pioneer:test/integration/steps/steps.coffee:2:completion
completion
@When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps ...
new @Widget({ root: selector }) .read(null, allCaps) .should.eventually.eql(content) @Given /^I search for "([^"]*)" I should get "([^"]*)"$/, (search, found) -> new @Widget({ root: "wow" }) .findByText(search).getText() .should.eventually.eql(found)
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
5190e93c15f8aaac246012ce47d110d687400b9d
523
https://github.com/mojotech/pioneer/blob/5190e93c15f8aaac246012ce47d110d687400b9d/test/integration/steps/steps.coffee
51
74
mojotech/pioneer:test/integration/steps/steps.coffee:2:raw_corpus
raw_corpus
@When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps ...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
8dddd9ac617fd57c9ed22ca2dd8ba87174745e3e
523
https://github.com/mojotech/pioneer/blob/8dddd9ac617fd57c9ed22ca2dd8ba87174745e3e/test/integration/steps/steps.coffee
51
67
mojotech/pioneer:test/integration/steps/steps.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isP...
this.When(/^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, function(child, root, isPresent) { return this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); }); ...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
8dddd9ac617fd57c9ed22ca2dd8ba87174745e3e
523
https://github.com/mojotech/pioneer/blob/8dddd9ac617fd57c9ed22ca2dd8ba87174745e3e/test/integration/steps/steps.coffee
51
67
mojotech/pioneer:test/integration/steps/steps.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.When(/^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, function(child, root, isPresent) { return this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { ret...
@When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I read the "([^"]*)" with an all caps ...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
8dddd9ac617fd57c9ed22ca2dd8ba87174745e3e
523
https://github.com/mojotech/pioneer/blob/8dddd9ac617fd57c9ed22ca2dd8ba87174745e3e/test/integration/steps/steps.coffee
51
67
mojotech/pioneer:test/integration/steps/steps.coffee:2:completion
completion
@When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent)
@When /^I read the "([^"]*)" with an all caps tranformer I should see "([^"]*)"$/, (selector, content) -> allCaps = (str) -> str.toUpperCase() new @Widget({ root: selector }) .read(null, allCaps) .should.eventually.eql(content)
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
8dddd9ac617fd57c9ed22ca2dd8ba87174745e3e
523
https://github.com/mojotech/pioneer/blob/8dddd9ac617fd57c9ed22ca2dd8ba87174745e3e/test/integration/steps/steps.coffee
51
67
mojotech/pioneer:test/integration/steps/steps.coffee:2:raw_corpus
raw_corpus
@When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent)
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
1a5beb9a7661c0359b6735bcd461586b95a1d9d7
523
https://github.com/mojotech/pioneer/blob/1a5beb9a7661c0359b6735bcd461586b95a1d9d7/test/integration/steps/steps.coffee
51
59
mojotech/pioneer:test/integration/steps/steps.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isP...
this.When(/^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, function(child, root, isPresent) { return this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect("" + present).to.eql(isPresent); }); });
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
1a5beb9a7661c0359b6735bcd461586b95a1d9d7
523
https://github.com/mojotech/pioneer/blob/1a5beb9a7661c0359b6735bcd461586b95a1d9d7/test/integration/steps/steps.coffee
51
59
mojotech/pioneer:test/integration/steps/steps.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.When(/^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, function(child, root, isPresent) { return this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { ret...
@When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent)
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
1a5beb9a7661c0359b6735bcd461586b95a1d9d7
523
https://github.com/mojotech/pioneer/blob/1a5beb9a7661c0359b6735bcd461586b95a1d9d7/test/integration/steps/steps.coffee
51
59
mojotech/pioneer:test/integration/steps/steps.coffee:2:completion
completion
@When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) ->
widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent)
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
1a5beb9a7661c0359b6735bcd461586b95a1d9d7
523
https://github.com/mojotech/pioneer/blob/1a5beb9a7661c0359b6735bcd461586b95a1d9d7/test/integration/steps/steps.coffee
51
59
mojotech/pioneer:test/integration/steps/steps.coffee:1:raw_corpus
raw_corpus
module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, (child, parent, content) -> base = new ...
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
dafc9c890823c64cb225d53c575d3d6afba17055
523
https://github.com/mojotech/pioneer/blob/dafc9c890823c64cb225d53c575d3d6afba17055/test/integration/steps/steps.coffee
1
21
mojotech/pioneer:test/integration/steps/steps.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see...
module.exports = function() { this.When(/^I read the "([^"]*)" I should see "([^"]*)"$/, function(selector, content) { return new this.Widget({ root: selector }).read().should.eventually.eql(content); }); this.When(/^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, function(ch...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
dafc9c890823c64cb225d53c575d3d6afba17055
523
https://github.com/mojotech/pioneer/blob/dafc9c890823c64cb225d53c575d3d6afba17055/test/integration/steps/steps.coffee
1
21
mojotech/pioneer:test/integration/steps/steps.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function() { this.When(/^I read the "([^"]*)" I should see "([^"]*)"$/, function(selector, content) { return new this.Widget({ root: selector }).read().should.eventually.eql(content); }); this.When(/^I find the "([^"]*)" element...
module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, (child, parent, content) -> base = new ...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
dafc9c890823c64cb225d53c575d3d6afba17055
523
https://github.com/mojotech/pioneer/blob/dafc9c890823c64cb225d53c575d3d6afba17055/test/integration/steps/steps.coffee
1
21
mojotech/pioneer:test/integration/steps/steps.coffee:1:completion
completion
module.exports = -> @When /^I read the "([^"]*)" I should see "([^"]*)"$/, (selector, content) -> new @Widget({ root: selector }) .read() .should.eventually.eql(content) @When /^I find the "([^"]*)" element within "([^"]*)" I should see "([^"]*)"$/, (child, parent, content) -> base = new ...
root: parent }) base.read(child) .should.eventually.eql(content) @When /^I eager find the "([^"]*)" element I should see "([^"]*)"$/, (selector, content) -> @Widget.find({ root: selector }).then (widget) -> widget.el.getText().should.eventually.equal(content)
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/steps.coffee
MIT
dafc9c890823c64cb225d53c575d3d6afba17055
523
https://github.com/mojotech/pioneer/blob/dafc9c890823c64cb225d53c575d3d6afba17055/test/integration/steps/steps.coffee
1
21
buttercoin/buttercoin:client.coffee:1:raw_corpus
raw_corpus
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT?account=#{data.operation.account}", data: data} ] client.event_filters.WITHDRAW_FUNDS = (data) -> [ {name: "W...
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
77680a0a0b00fad96697ce82e6b88329a71e54f3
663
https://github.com/buttercoin/buttercoin/blob/77680a0a0b00fad96697ce82e6b88329a71e54f3/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT?account=#{data.operation.account}", data: data} ] client.e...
var ApiClient, client, i, initUser, len, peter, ref, sally, stump, u; stump = require('stump'); ApiClient = require('./lib/ews/ew_api'); stump.stumpify(this, "[TEST]Client"); client = new ApiClient(); client.event_filters.ADD_DEPOSIT = function(data) { return [ { name: `ADD_DEPOSIT?account=${data.opera...
CoffeeScript
JavaScript
buttercoin/buttercoin
client.coffee
MIT
77680a0a0b00fad96697ce82e6b88329a71e54f3
663
https://github.com/buttercoin/buttercoin/blob/77680a0a0b00fad96697ce82e6b88329a71e54f3/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ApiClient, client, i, initUser, len, peter, ref, sally, stump, u; stump = require('stump'); ApiClient = require('./lib/ews/ew_api'); stump.stumpify(this, "[TEST]Client"); client = new ApiClient(); client.event_filters.ADD_DEPOSIT = function(data) { retur...
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT?account=#{data.operation.account}", data: data} ] client.event_filters.WITHDRAW_FUNDS = (data) -> [ {name: "W...
JavaScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
77680a0a0b00fad96697ce82e6b88329a71e54f3
663
https://github.com/buttercoin/buttercoin/blob/77680a0a0b00fad96697ce82e6b88329a71e54f3/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:completion
completion
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT?account=#{data.operation.account}", data: data} ] client.event_filters.WITHDRAW_FUNDS = (data) -> [ {name: "W...
stump.stumpify(sally, "[TEST]Sally") initUser = (u) -> @[u] = {} stump.stumpify(@[u], "[TEST]#{u}") client.on "ADD_DEPOSIT?account=#{u}", (data) => @[u].info "Added #{data.operation.amount} #{data.operation.currency}. New balance: #{data.retval}" client.on "WITHDRAW_FUNDS?account=#{u}", (data) => @[u]...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
77680a0a0b00fad96697ce82e6b88329a71e54f3
663
https://github.com/buttercoin/buttercoin/blob/77680a0a0b00fad96697ce82e6b88329a71e54f3/client.coffee
1
50
buttercoin/buttercoin:client.coffee:2:raw_corpus
raw_corpus
offered_currency: 'USD' offered_amount: '10' received_currency: 'BTC' received_amount: '1' .then => client.place_limit_order 'sally', offered_currency: 'BTC' offered_amount: '1' received_currency: 'USD' received_amount: '10' .then => client.withdraw_funds('peter', 'BTC', '1') .then => ...
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
77680a0a0b00fad96697ce82e6b88329a71e54f3
663
https://github.com/buttercoin/buttercoin/blob/77680a0a0b00fad96697ce82e6b88329a71e54f3/client.coffee
51
65
buttercoin/buttercoin:client.coffee:2:completion
completion
offered_currency: 'USD' offered_amount: '10' received_currency: 'BTC' received_amount: '1' .then => client.place_limit_order 'sally', offered_currency: 'BTC'
offered_amount: '1' received_currency: 'USD' received_amount: '10' .then => client.withdraw_funds('peter', 'BTC', '1') .then => client.withdraw_funds('sally', 'USD', '10') .done()
CoffeeScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
77680a0a0b00fad96697ce82e6b88329a71e54f3
663
https://github.com/buttercoin/buttercoin/blob/77680a0a0b00fad96697ce82e6b88329a71e54f3/client.coffee
51
65
buttercoin/buttercoin:client.coffee:1:raw_corpus
raw_corpus
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT?account=#{data.operation.account}", data: data} ] client.event_filters.CREAT...
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
2295cb65a1f5349db7dfd383b8f2a20b317f27e9
663
https://github.com/buttercoin/buttercoin/blob/2295cb65a1f5349db7dfd383b8f2a20b317f27e9/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT?account=#{data.operati...
var ApiClient, client, i, initUser, len, peter, ref, sally, stump, u; stump = require('stump'); ApiClient = require('./lib/ews/ew_api'); stump.stumpify(this, "[TEST]Client"); client = new ApiClient(); client.event_filters.ADD_DEPOSIT = function(data) { return [ { name: "ADD_DEPOSIT", data: data ...
CoffeeScript
JavaScript
buttercoin/buttercoin
client.coffee
MIT
2295cb65a1f5349db7dfd383b8f2a20b317f27e9
663
https://github.com/buttercoin/buttercoin/blob/2295cb65a1f5349db7dfd383b8f2a20b317f27e9/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ApiClient, client, i, initUser, len, peter, ref, sally, stump, u; stump = require('stump'); ApiClient = require('./lib/ews/ew_api'); stump.stumpify(this, "[TEST]Client"); client = new ApiClient(); client.event_filters.ADD_DEPOSIT = function(data) { retur...
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT?account=#{data.operation.account}", data: data} ] client.event_filters.CREAT...
JavaScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
2295cb65a1f5349db7dfd383b8f2a20b317f27e9
663
https://github.com/buttercoin/buttercoin/blob/2295cb65a1f5349db7dfd383b8f2a20b317f27e9/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:completion
completion
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT?account=#{data.operation.account}", data: data} ] client.event_filters.CREAT...
stump.stumpify(@[u], "[TEST]#{u}") client.on "ADD_DEPOSIT?account=#{u}", (data) => @[u].info "Added #{data.operation.amount} #{data.operation.currency}. New balance: #{data.retval}" client.on "CREATE_LIMIT_ORDER?account=#{u}", (data) => @[u].info "Created order #{data.retval[0].order.uuid}" client.get_...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
2295cb65a1f5349db7dfd383b8f2a20b317f27e9
663
https://github.com/buttercoin/buttercoin/blob/2295cb65a1f5349db7dfd383b8f2a20b317f27e9/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:raw_corpus
raw_corpus
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT?account=#{data.operation.account}", data: data} ] client.event_filters.CREAT...
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
ec9409218e1839d66794aa3204f25af76cafcd5c
663
https://github.com/buttercoin/buttercoin/blob/ec9409218e1839d66794aa3204f25af76cafcd5c/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT?account=#{data.operati...
var ApiClient, client, peter, stump; stump = require('stump'); ApiClient = require('./lib/ews/ew_api'); stump.stumpify(this, "[TEST]Client"); client = new ApiClient(); client.event_filters.ADD_DEPOSIT = function(data) { return [ { name: "ADD_DEPOSIT", data: data }, { name: `ADD_DEPO...
CoffeeScript
JavaScript
buttercoin/buttercoin
client.coffee
MIT
ec9409218e1839d66794aa3204f25af76cafcd5c
663
https://github.com/buttercoin/buttercoin/blob/ec9409218e1839d66794aa3204f25af76cafcd5c/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ApiClient, client, peter, stump; stump = require('stump'); ApiClient = require('./lib/ews/ew_api'); stump.stumpify(this, "[TEST]Client"); client = new ApiClient(); client.event_filters.ADD_DEPOSIT = function(data) { return [ { name: "ADD_DEPOSI...
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT?account=#{data.operation.account}", data: data} ] client.event_filters.CREAT...
JavaScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
ec9409218e1839d66794aa3204f25af76cafcd5c
663
https://github.com/buttercoin/buttercoin/blob/ec9409218e1839d66794aa3204f25af76cafcd5c/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:completion
completion
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT?account=#{data.operation.account}", data: data} ] client.event_filters.CREAT...
#peter.error "DATA:", data client.on "CREATE_LIMIT_ORDER?account=peter", (data) -> peter.info "Created order #{data.retval[0].order.uuid}" client.get_balances('peter').then (result) => peter.info "Got balances:" for k, v of result.balances peter.info "\t#{k}:", v #client.on "pump", (data) -> #pete...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
ec9409218e1839d66794aa3204f25af76cafcd5c
663
https://github.com/buttercoin/buttercoin/blob/ec9409218e1839d66794aa3204f25af76cafcd5c/client.coffee
1
50
buttercoin/buttercoin:client.coffee:1:raw_corpus
raw_corpus
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT/account:#{data.operation.account}", data: data} ] client.on "ADD_DEPOSIT", -...
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
169600a25a737c3f327e55fceb0ea5d45aaf19a8
663
https://github.com/buttercoin/buttercoin/blob/169600a25a737c3f327e55fceb0ea5d45aaf19a8/client.coffee
1
27
buttercoin/buttercoin:client.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT/account:#{data.operati...
var ApiClient, client, stump; stump = require('stump'); ApiClient = require('./lib/ews/ew_api'); stump.stumpify(this, "[TEST]Client"); client = new ApiClient(); client.event_filters.ADD_DEPOSIT = function(data) { return [ { name: "ADD_DEPOSIT", data: data }, { name: `ADD_DEPOSIT/acc...
CoffeeScript
JavaScript
buttercoin/buttercoin
client.coffee
MIT
169600a25a737c3f327e55fceb0ea5d45aaf19a8
663
https://github.com/buttercoin/buttercoin/blob/169600a25a737c3f327e55fceb0ea5d45aaf19a8/client.coffee
1
27
buttercoin/buttercoin:client.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ApiClient, client, stump; stump = require('stump'); ApiClient = require('./lib/ews/ew_api'); stump.stumpify(this, "[TEST]Client"); client = new ApiClient(); client.event_filters.ADD_DEPOSIT = function(data) { return [ { name: "ADD_DEPOSIT", ...
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT/account:#{data.operation.account}", data: data} ] client.on "ADD_DEPOSIT", -...
JavaScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
169600a25a737c3f327e55fceb0ea5d45aaf19a8
663
https://github.com/buttercoin/buttercoin/blob/169600a25a737c3f327e55fceb0ea5d45aaf19a8/client.coffee
1
27
buttercoin/buttercoin:client.coffee:1:completion
completion
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.event_filters.ADD_DEPOSIT = (data) -> [ {name: "ADD_DEPOSIT", data: data}, {name: "ADD_DEPOSIT/account:#{data.operation.account}", data: data} ] client.on "ADD_DEPOSIT", -...
@warn "YAY GOT GENERIC DEPOSIT EVENT" client.on "ADD_DEPOSIT/account:peter", -> @error "YAY GOT PETER DEPOSIT EVENT" client.start().then => client.deposit_funds('peter', 'USD', '5').then (result) => @info "Deposited 5 USD. New balance: $#{result.retval}" .then => client.get_balances('peter').then (result) =...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
169600a25a737c3f327e55fceb0ea5d45aaf19a8
663
https://github.com/buttercoin/buttercoin/blob/169600a25a737c3f327e55fceb0ea5d45aaf19a8/client.coffee
1
27
buttercoin/buttercoin:client.coffee:1:raw_corpus
raw_corpus
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.start().then => client.deposit_funds('peter', 'USD', '5').then (result) => @info "Deposited 5 USD. New balance: $#{result.retval}" .then => client.get_balances('peter').then (r...
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
a3d546dc9e3d772b25933baa2a61c94d54604724
663
https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/client.coffee
1
15
buttercoin/buttercoin:client.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.start().then => client.deposit_funds('peter', 'USD', '5').then (result) => @info "Deposited 5 USD. New balance: $#{result...
var ApiClient, client, stump; stump = require('stump'); ApiClient = require('./lib/ews/ew_api'); stump.stumpify(this, "[TEST]Client"); client = new ApiClient(); client.start().then(() => { return client.deposit_funds('peter', 'USD', '5').then((result) => { return this.info(`Deposited 5 USD. New balance: $${r...
CoffeeScript
JavaScript
buttercoin/buttercoin
client.coffee
MIT
a3d546dc9e3d772b25933baa2a61c94d54604724
663
https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/client.coffee
1
15
buttercoin/buttercoin:client.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ApiClient, client, stump; stump = require('stump'); ApiClient = require('./lib/ews/ew_api'); stump.stumpify(this, "[TEST]Client"); client = new ApiClient(); client.start().then(() => { return client.deposit_funds('peter', 'USD', '5').then((result) => { ...
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.start().then => client.deposit_funds('peter', 'USD', '5').then (result) => @info "Deposited 5 USD. New balance: $#{result.retval}" .then => client.get_balances('peter').then (r...
JavaScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
a3d546dc9e3d772b25933baa2a61c94d54604724
663
https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/client.coffee
1
15
buttercoin/buttercoin:client.coffee:1:completion
completion
stump = require('stump') ApiClient = require('./lib/ews/ew_api') stump.stumpify(this, "[TEST]Client") client = new ApiClient() client.start().then =>
client.deposit_funds('peter', 'USD', '5').then (result) => @info "Deposited 5 USD. New balance: $#{result.retval}" .then => client.get_balances('peter').then (result) => @info "Got balances:" for k, v of result.balances console.log "#{k}:", v .done()
CoffeeScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
a3d546dc9e3d772b25933baa2a61c94d54604724
663
https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/client.coffee
1
15
buttercoin/buttercoin:client.coffee:1:raw_corpus
raw_corpus
stump = require('stump') EngineWebsocketServer = require('./lib/ews/ew_server') EngineWebsocketSlave = require('./lib/ews/ew_slave') WebsocketInitiator = require('./lib/ews/ws_initiator') InitiatorProtocol = require('./lib/ews/i_protocol') options = { journalname: "testjournal" } wsi = new WebsocketInitiator( { ...
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
eaa94ca8f63b9a3545b0f217d2e280ada471a47e
663
https://github.com/buttercoin/buttercoin/blob/eaa94ca8f63b9a3545b0f217d2e280ada471a47e/client.coffee
1
38
buttercoin/buttercoin:client.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript stump = require('stump') EngineWebsocketServer = require('./lib/ews/ew_server') EngineWebsocketSlave = require('./lib/ews/ew_slave') WebsocketInitiator = require('./lib/ews/ws_initiator') InitiatorProtocol = require('./lib/ews/i_protocol') options = { journa...
var EngineWebsocketServer, EngineWebsocketSlave, InitiatorProtocol, WebsocketInitiator, options, stump, wsi; stump = require('stump'); EngineWebsocketServer = require('./lib/ews/ew_server'); EngineWebsocketSlave = require('./lib/ews/ew_slave'); WebsocketInitiator = require('./lib/ews/ws_initiator'); InitiatorProto...
CoffeeScript
JavaScript
buttercoin/buttercoin
client.coffee
MIT
eaa94ca8f63b9a3545b0f217d2e280ada471a47e
663
https://github.com/buttercoin/buttercoin/blob/eaa94ca8f63b9a3545b0f217d2e280ada471a47e/client.coffee
1
38
buttercoin/buttercoin:client.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var EngineWebsocketServer, EngineWebsocketSlave, InitiatorProtocol, WebsocketInitiator, options, stump, wsi; stump = require('stump'); EngineWebsocketServer = require('./lib/ews/ew_server'); EngineWebsocketSlave = require('./lib/ews/ew_slave'); WebsocketInitiat...
stump = require('stump') EngineWebsocketServer = require('./lib/ews/ew_server') EngineWebsocketSlave = require('./lib/ews/ew_slave') WebsocketInitiator = require('./lib/ews/ws_initiator') InitiatorProtocol = require('./lib/ews/i_protocol') options = { journalname: "testjournal" } wsi = new WebsocketInitiator( { ...
JavaScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
eaa94ca8f63b9a3545b0f217d2e280ada471a47e
663
https://github.com/buttercoin/buttercoin/blob/eaa94ca8f63b9a3545b0f217d2e280ada471a47e/client.coffee
1
38
buttercoin/buttercoin:client.coffee:1:completion
completion
stump = require('stump') EngineWebsocketServer = require('./lib/ews/ew_server') EngineWebsocketSlave = require('./lib/ews/ew_slave') WebsocketInitiator = require('./lib/ews/ws_initiator') InitiatorProtocol = require('./lib/ews/i_protocol') options = { journalname: "testjournal" } wsi = new WebsocketInitiator( { ...
account: "peter" amount: "5" currency: 'BTC' .then (retval) => stump.info 'GOT RETVAL', retval .then => wsi.execute_operation kind: "ADD_DEPOSIT" account: "tom" amount: "5" currency: 'USD' .then (retval) => stump.info 'GOT RETVAL', retval .then => wsi.execute_operation kind: ...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
eaa94ca8f63b9a3545b0f217d2e280ada471a47e
663
https://github.com/buttercoin/buttercoin/blob/eaa94ca8f63b9a3545b0f217d2e280ada471a47e/client.coffee
1
38
buttercoin/buttercoin:client.coffee:1:raw_corpus
raw_corpus
stump = require('stump') EngineWebsocketServer = require('./lib/ews/ew_server') EngineWebsocketSlave = require('./lib/ews/ew_slave') WebsocketInitiator = require('./lib/ews/ws_initiator') InitiatorProtocol = require('./lib/ews/i_protocol') options = { journalname: "testjournal" } wsi = new WebsocketInitiator( { ...
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
46d1f5270f26492ff7928771e4a55b06ed8c9aab
663
https://github.com/buttercoin/buttercoin/blob/46d1f5270f26492ff7928771e4a55b06ed8c9aab/client.coffee
1
27
buttercoin/buttercoin:client.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript stump = require('stump') EngineWebsocketServer = require('./lib/ews/ew_server') EngineWebsocketSlave = require('./lib/ews/ew_slave') WebsocketInitiator = require('./lib/ews/ws_initiator') InitiatorProtocol = require('./lib/ews/i_protocol') options = { journa...
var EngineWebsocketServer, EngineWebsocketSlave, InitiatorProtocol, WebsocketInitiator, options, stump, wsi; stump = require('stump'); EngineWebsocketServer = require('./lib/ews/ew_server'); EngineWebsocketSlave = require('./lib/ews/ew_slave'); WebsocketInitiator = require('./lib/ews/ws_initiator'); InitiatorProto...
CoffeeScript
JavaScript
buttercoin/buttercoin
client.coffee
MIT
46d1f5270f26492ff7928771e4a55b06ed8c9aab
663
https://github.com/buttercoin/buttercoin/blob/46d1f5270f26492ff7928771e4a55b06ed8c9aab/client.coffee
1
27
buttercoin/buttercoin:client.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var EngineWebsocketServer, EngineWebsocketSlave, InitiatorProtocol, WebsocketInitiator, options, stump, wsi; stump = require('stump'); EngineWebsocketServer = require('./lib/ews/ew_server'); EngineWebsocketSlave = require('./lib/ews/ew_slave'); WebsocketInitiat...
stump = require('stump') EngineWebsocketServer = require('./lib/ews/ew_server') EngineWebsocketSlave = require('./lib/ews/ew_slave') WebsocketInitiator = require('./lib/ews/ws_initiator') InitiatorProtocol = require('./lib/ews/i_protocol') options = { journalname: "testjournal" } wsi = new WebsocketInitiator( { ...
JavaScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
46d1f5270f26492ff7928771e4a55b06ed8c9aab
663
https://github.com/buttercoin/buttercoin/blob/46d1f5270f26492ff7928771e4a55b06ed8c9aab/client.coffee
1
27
buttercoin/buttercoin:client.coffee:1:completion
completion
stump = require('stump') EngineWebsocketServer = require('./lib/ews/ew_server') EngineWebsocketSlave = require('./lib/ews/ew_slave') WebsocketInitiator = require('./lib/ews/ws_initiator') InitiatorProtocol = require('./lib/ews/i_protocol') options = { journalname: "testjournal" } wsi = new WebsocketInitiator( {
wsconfig: 'ws://localhost:6150/' protocol: new InitiatorProtocol( {} ) } ) wsi.connect().then => wsi.execute_operation( { kind: "ADD_DEPOSIT" account: "peter" amount: "5" currency: 'BTC' } ).then (retval) => stump.info 'GOT RETVAL', retval .done()
CoffeeScript
CoffeeScript
buttercoin/buttercoin
client.coffee
MIT
46d1f5270f26492ff7928771e4a55b06ed8c9aab
663
https://github.com/buttercoin/buttercoin/blob/46d1f5270f26492ff7928771e4a55b06ed8c9aab/client.coffee
1
27
jianliaoim/talk-os:talk-web/client/app/profile-email.coffee:1:raw_corpus
raw_corpus
cx = require 'classnames' React = require 'react' recorder = require 'actions-recorder' query = require '../query' userActions = require '../actions/user' notifyActions = require '../actions/notify' lang = require '../locales/lang' util = require '../util/util' div = React.createFactory 'div' input = React.createFa...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/profile-email.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/profile-email.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/profile-email.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript cx = require 'classnames' React = require 'react' recorder = require 'actions-recorder' query = require '../query' userActions = require '../actions/user' notifyActions = require '../actions/notify' lang = require '../locales/lang' util = require '../util/util...
var React, T, cx, div, input, lang, notifyActions, query, recorder, userActions, util; cx = require('classnames'); React = require('react'); recorder = require('actions-recorder'); query = require('../query'); userActions = require('../actions/user'); notifyActions = require('../actions/notify'); lang = require(...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/profile-email.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/profile-email.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/profile-email.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var React, T, cx, div, input, lang, notifyActions, query, recorder, userActions, util; cx = require('classnames'); React = require('react'); recorder = require('actions-recorder'); query = require('../query'); userActions = require('../actions/user'); notifyA...
cx = require 'classnames' React = require 'react' recorder = require 'actions-recorder' query = require '../query' userActions = require '../actions/user' notifyActions = require '../actions/notify' lang = require '../locales/lang' util = require '../util/util' div = React.createFactory 'div' input = React.createFa...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/profile-email.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/profile-email.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/profile-email.coffee:1:completion
completion
cx = require 'classnames' React = require 'react' recorder = require 'actions-recorder' query = require '../query' userActions = require '../actions/user' notifyActions = require '../actions/notify' lang = require '../locales/lang' util = require '../util/util' div = React.createFactory 'div' input = React.createFa...
email: @props.email onChange: (event) -> @setState email: event.target.value onComplete: -> _userId = query.userId(recorder.getState()) if @state.email.length isnt 0 and util.isEmail @state.email userActions.userUpdate _userId, email: @state.email @props.onComplete() else notifyA...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/profile-email.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/profile-email.coffee
1
50
jashkenas/coffeescript:test/option_parser.coffee:1:raw_corpus
raw_corpus
# Option Parser # ------------- # Ensure that the OptionParser handles arguments correctly. return unless require? {OptionParser} = require './../lib/coffeescript/optparse' flags = [ ['-r', '--required [DIR]', 'desc required'] ['-o', '--optional', 'desc optional'] ['-l', '--list [FILES*]', 'desc list'...
CoffeeScript
jashkenas/coffeescript
test/option_parser.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/option_parser.coffee
1
41
jashkenas/coffeescript:test/option_parser.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Option Parser # ------------- # Ensure that the OptionParser handles arguments correctly. return unless require? {OptionParser} = require './../lib/coffeescript/optparse' flags = [ ['-r', '--required [DIR]', 'desc required'] ['-o', '--optional', '...
// Option Parser // ------------- // Ensure that the OptionParser handles arguments correctly. var OptionParser, banner, flags, opt; if (typeof require === "undefined" || require === null) { return; } ({OptionParser} = require('./../lib/coffeescript/optparse')); flags = [['-r', '--required [DIR]', 'desc required'...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/option_parser.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/option_parser.coffee
1
41
jashkenas/coffeescript:test/option_parser.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Option Parser // ------------- // Ensure that the OptionParser handles arguments correctly. var OptionParser, banner, flags, opt; if (typeof require === "undefined" || require === null) { return; } ({OptionParser} = require('./../lib/coffeescript/optparse')...
# Option Parser # ------------- # Ensure that the OptionParser handles arguments correctly. return unless require? {OptionParser} = require './../lib/coffeescript/optparse' flags = [ ['-r', '--required [DIR]', 'desc required'] ['-o', '--optional', 'desc optional'] ['-l', '--list [FILES*]', 'desc list'...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/option_parser.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/option_parser.coffee
1
41
jashkenas/coffeescript:test/option_parser.coffee:1:completion
completion
# Option Parser # ------------- # Ensure that the OptionParser handles arguments correctly. return unless require? {OptionParser} = require './../lib/coffeescript/optparse' flags = [ ['-r', '--required [DIR]', 'desc required'] ['-o', '--optional', 'desc optional'] ['-l', '--list [FILES*]', 'desc list'...
args = ['one', 'two', 'three', '-r', 'dir'] result = opt.parse args arrayEq args, result.arguments eq undefined, result.required test "boolean and parameterised options", -> result = opt.parse ['--optional', '-r', 'folder', 'one', 'two'] ok result.optional eq 'folder', result.required arrayEq ['one', 'tw...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/option_parser.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/option_parser.coffee
1
41
jashkenas/coffeescript:test/option_parser.coffee:2:raw_corpus
raw_corpus
args = ['--','-o','a','-r','c','-o','--','-a','arg0','-b','arg1'] result = opt.parse args eq undefined, result.optional eq undefined, result.required arrayEq args[1..], result.arguments test "throw if multiple flags try to use the same short or long name", -> throws -> new OptionParser [ ['-r', '--requir...
CoffeeScript
jashkenas/coffeescript
test/option_parser.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/option_parser.coffee
43
82
jashkenas/coffeescript:test/option_parser.coffee:2:completion
completion
args = ['--','-o','a','-r','c','-o','--','-a','arg0','-b','arg1'] result = opt.parse args eq undefined, result.optional eq undefined, result.required arrayEq args[1..], result.arguments test "throw if multiple flags try to use the same short or long name", -> throws -> new OptionParser [ ['-r', '--requir...
] throws -> new OptionParser [ ['-j', '--just-long', 'desc'] ['--just-long', 'another desc'] ] throws -> new OptionParser [ ['--just-long', 'desc'] ['-j', '--just-long', 'another desc'] ] test "outputs expected help text", -> expectedBanner = ''' banner text -r, --required des...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/option_parser.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/option_parser.coffee
43
82
jashkenas/coffeescript:test/option_parser.coffee:1:raw_corpus
raw_corpus
# Option Parser # ------------- # TODO: refactor option parser tests # Ensure that the OptionParser handles arguments correctly. return unless require? {OptionParser} = require './../lib/coffeescript/optparse' opt = new OptionParser [ ['-r', '--required [DIR]', 'desc required'] ['-o', '--optional', 'desc...
CoffeeScript
jashkenas/coffeescript
test/option_parser.coffee
MIT
4cc701a9da0132efbb5c58c142cec0348443ec1d
16,577
https://github.com/jashkenas/coffeescript/blob/4cc701a9da0132efbb5c58c142cec0348443ec1d/test/option_parser.coffee
1
43