Skip to content

Instantly share code, notes, and snippets.

"use script";
const webdriver = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const firefox = require('selenium-webdriver/firefox');
const edge = require('selenium-webdriver/edge');
const Command = require("selenium-webdriver/lib/command").Command;
const { logging } = webdriver
@mandric
mandric / test.js
Last active May 2, 2019 19:36
start a service and test it example from heroku
const { spawn } = require('child_process');
const request = require('request');
const test = require('tape');
// Start the app
const env = Object.assign({}, process.env, {PORT: 5000});
const child = spawn('node', ['index.js'], {env});
test('responds to requests', (t) => {
t.plan(4);
#!/usr/bin/env bash
# https://github.com/microsoft/dotnet-framework-docker/blob/master/eng/common/pull-image.sh
# Stop script on NZEC
set -e
# Stop script if unbound variable found (use ${var:-} if intentional)
set -u
print_err() {
printf "%b\n" "Error: $1" >&2