Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const log = require('simple-node-logger').createSimpleFileLogger('widdix.log'); // TODO replace with something that can be flushed finally
const serializeError = require('serialize-error');
const wrapper = (level) => {
return (message, data) => {
if (data !== undefined) {
if (data instanceof Error) {
log[level](message, serializeError(data));
} else {
log[level](message, JSON.stringify(data));
}
} else {
log[level](message);
}
};
};
code: '2',
description: 'test 2',
id: 'test-stop-2',
lat: '37.04783038',
lon: '-122.07521176',
name: 'Russell Ave and Valley Dr',
url: 'example.stop/2'
}
let testProjectId
let feedSourceId
let scratchFeedSourceId
let routerId
const log = SimpleNodeLogger.createSimpleFileLogger(
getTestFolderFilename(`e2e-run-${fileSafeTestTime}.log`)
)
const browserEventLogs = SimpleNodeLogger.createSimpleFileLogger(
getTestFolderFilename(`e2e-run-${fileSafeTestTime}-browser-events.log`)
)
const testResults = {}
const defaultTestTimeout = 100000
const defaultJobTimeout = 100000
function makeMakeTest (defaultDependentTests: Array | string = []) {
if (!(defaultDependentTests instanceof Array)) {
defaultDependentTests = [defaultDependentTests]
}
return (
name: string,
fn: Function,
timeout?: number,
dependentTests: Array | string = []
) => {
url: 'example.stop/1'
}
const dummyStop2 = {
code: '2',
description: 'test 2',
id: 'test-stop-2',
lat: '37.04783038',
lon: '-122.07521176',
name: 'Russell Ave and Valley Dr',
url: 'example.stop/2'
}
let testProjectId
let feedSourceId
let scratchFeedSourceId
let routerId
const log = SimpleNodeLogger.createSimpleFileLogger(
getTestFolderFilename(`e2e-run-${fileSafeTestTime}.log`)
)
const browserEventLogs = SimpleNodeLogger.createSimpleFileLogger(
getTestFolderFilename(`e2e-run-${fileSafeTestTime}-browser-events.log`)
)
const testResults = {}
const defaultTestTimeout = 100000
const defaultJobTimeout = 100000
function makeMakeTest (defaultDependentTests: Array | string = []) {
if (!(defaultDependentTests instanceof Array)) {
defaultDependentTests = [defaultDependentTests]
}
return (
name: string,
fn: Function,
const uniqid = require('uniqid');
const log = require('simple-node-logger').createSimpleFileLogger(`${__dirname}/bin/logs/lazlo.log`);
//operator comparison for simple where clause
function whereComp(prop, operator, val) {
let output = [];
if (operator === '=') {
cache.forEach((obj) => {
if (obj[prop] == val) {
output.push(obj);
}
});
} else if (operator === '!=') {
cache.forEach((obj) => {
if (obj[prop] != val) {
output.push(obj);
}