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
[22:00:13] Using gulpfile ~//gulpfile.js | |
[22:00:13] Starting 'selenium'... | |
[22:00:15] Finished 'selenium' after 1.55 s | |
[22:00:15] Starting 'google'... | |
[1;33m=======================================================================================[0m | |
Selenium 2.0 / webdriver protocol bindings implementation with helper commands in nodejs. | |
For a complete list of commands, visit [1;32mhttp://webdriver.io/api.html[0m. | |
[1;33m=======================================================================================[0m |
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
[21:56:56] Using gulpfile ~//gulpfile.js | |
[21:56:56] Starting 'selenium'... | |
[21:56:58] Finished 'selenium' after 1.37 s | |
[21:56:58] Starting 'google'... | |
[1;33m=======================================================================================[0m | |
Selenium 2.0 / webdriver protocol bindings implementation with helper commands in nodejs. | |
For a complete list of commands, visit [1;32mhttp://webdriver.io/api.html[0m. | |
[1;33m=======================================================================================[0m |
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
import { expect } from 'chai'; | |
describe('Bad test when awaiting google Suite', () => { | |
beforeEach(async () => { | |
await browser.url('https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=bit-bundler'); | |
}); | |
describe('Getting all results container', () => { | |
var resultWithId, resultText; |
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
function streamChain(seed) { | |
var accumulator = []; | |
var streamFacade = { | |
write: function() { | |
throw new TypeError("This is not a stream. Please call sequence or parallel to get a stream out of this."); | |
}, | |
pipe: function(stream) { | |
if (!seed) { | |
seed = stream; |
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
var browserify = require('browserify'); | |
var gulp = require('gulp'); | |
var source = require('vinyl-source-stream'); | |
var through = require('through'); | |
var libs = ['jquery', 'bootstrap']; | |
gulp.task('app-bundle', function() { | |
var appBundler = browserify(['./app.js']); | |
libs.forEach(function(lib) { |
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
var stream = require("stream"); | |
var inherits = require("util").inherits; | |
function thru(chunk, encoding, handler) { | |
handler.next(chunk); | |
} | |
function handlerWrapper(next) { | |
return { | |
next: function(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
function keypath(input) { | |
var regex = /(\w+)|\[([^\]]+)\]/g; | |
var result = []; | |
var path; | |
while ((path = regex.exec(input || ''))) { | |
if (input[path.index] === '[') { | |
result.push(path[2]); | |
} | |
else { |
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
var fs = require("fs"); | |
var mkdirp = require("mkdirp"); | |
var path = require("path"); | |
var chance = require("chance"); | |
function fileStream(dest) { | |
mkdirp.sync(path.dirname(dest)); | |
return fs.createWriteStream(dest); | |
} |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
var fs = require("fs"); | |
var mkdirp = require("mkdirp"); | |
var path = require("path"); | |
function fileStream(dest) { | |
mkdirp.sync(path.dirname(dest)); | |
return fs.createWriteStream(dest); | |
} | |
var writableStream = fileStream("./somecontent.js"); |