/* globals expect
420637
function () {
  var handlers = {};

  function raise (ev) {
    if (handlers[ ev ]) {
      handlers[ ev ].apply(undefined, Array.prototype.slice.call(arguments, 1));
    }
  }

  function on (ev, handle) {
    handlers[ ev ] = handle;
  }

  function reset () {
    handlers = {};
    this.close = noOp;
    this.createChannel = noOp;
    this.createConfirmChannel = noOp;
    this.release = noOp;
  }

  var instance = {
    acquire: function () {
      this.raise('acquiring');
      return Promise.resolve();
    },
    item: { uri: '' },
    close: noOp,
    createChannel: noOp,
    createConfirmChannel: noOp,
    on: on,
    raise: raise,
    release: noOp,
    reset: reset
  };
  setTimeout(instance.acquire.bind(instance), 0);
  return instance;
}
569699
function (isGlobal, server, err, msg, session, resp, opts, cb) {
  let handler;
  if (isGlobal) {
    handler = server.app.get(Constants.RESERVED.GLOBAL_ERROR_HANDLER);
  } else {
    handler = server.app.get(Constants.RESERVED.ERROR_HANDLER);
  }
  if (!handler) {
    logger.debug('no default error handler to resolve unknown exception. ' + err.stack);
    utils.invokeCallback(cb, err, resp, opts);
  } else {
    if (handler.length === 5) {
      handler(err, msg, resp, session, cb);
    } else {
      handler(err, msg, resp, session, opts, cb);
    }
  }
}
1218476
function run2(stringOrFunction, number, boolean, anyDataType, anObject) {
        /*
        * If you don't want args-checker to throw errors, just simply pass a true value
        * on the third parameter. Or you can pass a callback function to get the results/errors
        * thrown by args-checker.
        * */
        args.expect(arguments, ['string|function', 'number', 'boolean', '*', 'object'], function(results) {
            console.log(results);
        });

        // do something here...
    }
755524
async function preRenderElements (elements, globals) {
  for (let element of elements) {
    await element.preRender(globals)
  }
}
715479
function( name, actual, expected ) {
		return this.ok( name, actual === expected, this.equal, "\nValues should match\nActual:" + actual + "\nExpected:" + expected );
	}
994148
function (statements, global) {
            var source = [];
            if (!global) {
                source.push('function(scopes) {');
            }
            source.push('var buffer = ""' + (global ? ',' : ';'));
            if (global) {
                source.push('config = this.config,' +
                    // current xtemplate engine
                    'engine = this, ' +
                    'utils = config.utils;');

                var natives = '',
                    c,
                    utils = XTemplateRuntime.utils;

                for (c in utils) {
                    natives += c + 'Util = utils["' + c + '"],';
                }

                if (natives) {
                    source.push('var ' + natives.slice(0, natives.length - 1) + ';');
                }
            }
            if (statements) {
                for (var i = 0, len = statements.length; i < len; i++) {
                    pushToArray(source, this[statements[i].type](statements[i]));
                }
            }
            source.push('return buffer;');
            if (!global) {
                source.push('}');
                return source;
            } else {
                return {
                    params: ['scopes', 'S', 'undefined'],
                    source: source
                };
            }
        }
36197
function( expectation ){
        var expr;
        var match;
        var name;
        
        for( var j = 0; j < exprs.length; j++ ){
          var e = exprs[j];
          var n = e.name;

          // ignore this expression if it doesn't meet the expectation function
          if( $$.is.fn( expectation ) && !expectation(n, e) ){ continue }

          var m = remaining.match(new RegExp( '^' + e.regex ));
          
          if( m != null ){
            match = m;
            expr = e;
            name = n;
            
            var consumed = m[0];
            remaining = remaining.substring( consumed.length );                
            
            break; // we've consumed one expr, so we can return now
          }
        }
        
        return {
          expr: expr,
          match: match,
          name: name
        };
      }
417436
async function _expectSuccessMessage(args, ...successMessages) {
  const { stdout, stderr } = await exec(getAntCommand(args));
  for (const successMessage of successMessages) {
    expect(stdout).toContain(successMessage);
  }
  expect(stderr).toEqual('');
}
1119634
function strictEqual(actual, expected, message) {
    if (actual === expected) {
      this.pass(message);
    }
    else {
      this.fail({
        actual: actual,
        expected: expected,
        message: message,
        operator: "==="
      });
    }
  }
227908
def expect(self):
        '''
        
        '''
        exp = Expectation(self)
        self._expectations.append(exp)
        return exp
286962
function(data) {
			if (globalConfig.debug) {
				// We grab console via getGlobal() so we can stub it out in tests
				var globalConsole = this.getGlobal('console');
				if (globalConsole && globalConsole.info) {
					globalConsole.info(data);
				}
			}
		}
721904
function triggerGlobal(settings, context, eventName, data) {
        if (settings.global)
            return triggerAndReturn(context || document, eventName, data);
    }
801584
function expectJSON(fn, res) {
  bluebird.try(fn).then(function (result) {
    res.json(result);
  }).catch(handleError(res));
}
1367849
function defineGlobals() {
  Object.keys(NODEIFY_FUNCTIONS).forEach((nodeifyName) => {
    global[nodeifyName] = NODEIFY_FUNCTIONS[nodeifyName].nodeify;
  });

  Object.keys(PROMISE_TYPES).forEach((promiseName) => {
    global[promiseName] = PROMISE_TYPES[promiseName].Promise;
  });
}
570668
function(actual, expected, negate, name) {
      return 'expected ' + puts(actual) + ' to ' + 
               (negate ? 'not ' : '') + 
                  name.replace(/_/g, ' ') +
                    ' ' + (expected.length > 1 ?
                      puts.apply(this, expected.slice(1)) :
                        '')
    }
769027
function expectRejection (promise, expectedReason) {
    return promise.then(
        () => fail('Expected promise to be rejected'),
        reason => {
            if (expectedReason instanceof Error) {
                expect(reason instanceof expectedReason.constructor).toBeTruthy();
                expect(reason.message).toContain(expectedReason.message);
            } else if (typeof expectedReason === 'function') {
                expect(expectedReason(reason)).toBeTruthy();
            } else if (expectedReason !== undefined) {
                expect(reason).toBe(expectedReason);
            } else {
                expect().nothing();
            }
        });
}
513412
function expectSpaceAfter(token, pattern) {
            const nextToken = sourceCode.getTokenAfter(token);

            if (nextToken &&
                (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) &&
                !isCloseParenOfTemplate(nextToken) &&
                astUtils.isTokenOnSameLine(token, nextToken) &&
                !sourceCode.isSpaceBetweenTokens(token, nextToken)
            ) {
                context.report({
                    loc: token.loc.start,
                    messageId: "expectedAfter",
                    data: token,
                    fix(fixer) {
                        return fixer.insertTextAfter(token, " ");
                    }
                });
            }
        }