summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/JSONStream/test/run.js
blob: 7d62e7385bd44fa588ea81d117c1b19dfeef8bbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
var readdirSync = require('fs').readdirSync
var spawnSync = require('child_process').spawnSync
var extname = require('path').extname

var files = readdirSync(__dirname)
files.forEach(function(file){
  if (extname(file) !== '.js' || file === 'run.js')
    return
  console.log(`*** ${file} ***`)
  var result = spawnSync(process.argv0, [file], { stdio: 'inherit', cwd: __dirname} )
  if (result.status !== 0)
    process.exit(result.status)
})