let tests = [
  // expect, string to match against
  [ true, 'foobar' ],
  [ false, 'foobaz' ],
  [ true, 'wheelbarrow' ],
];

let re = /bar/;

for (let i = 0; i < tests.length; i++) {
  var test = tests[i];
  var expected = test[0];
  var string = test[1];
  var result = !!string.match(re);
  print(i + ": '" + string + "': " +
        "expected " + expected + ", got " + result + ": " +
        (result == expected ? "OK" : "FAIL"));
}

let tests = [
  // what result to expect, string to match against
  [ true, '/home/mike/git/work/stripes-experiments/stripes-connect' ],
  [ true, '/home/mike/git/work/stripes-loader/' ],
  [ true, '/home/mike/git/work/stripes-experiments/okapi-console/' ],
  [ true, '/home/mike/git/work/stripes-experiments/stripes-core/src/' ],
  [ false, '/home/mike/git/work/stripes-experiments/stripes-core/node_modules/camelcase' ],
];

// The regexp used in webpack.config.base.js to choose which source files get transpiled
let re = /\/stripes-/;

for (let i = 0; i < tests.length; i++) {
  var test = tests[i];
  var expected = test[0];
  var string = test[1];
  var result = !!string.match(re);
  print(i + ": '" + string + "': " +
        "expected " + expected + ", got " + result + ": " +
        (result == expected ? "OK" : "FAIL"));
}

Switch to actual regexp and paths. Rather obvious demo that Jason was right about node_modules.
Switch to actual regexp and paths. Rather obvious demo that Jason was right about node_modules.
