HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall/node_modules/papaparse/tests/test.js
var connect = require('connect');
var serveStatic = require('serve-static');
var open = require('open');
var path = require('path');
var childProcess = require('child_process');

var server = connect().use(serveStatic(path.join(__dirname, '/..'))).listen(8071, function() {
	if (process.argv.indexOf('--mocha-headless-chrome') !== -1) {
		childProcess.spawn('node_modules/.bin/mocha-headless-chrome', ['-f', 'http://localhost:8071/tests/tests.html'], {
			stdio: 'inherit'
		}).on('exit', function(code) {
			server.close();
			process.exit(code);  // eslint-disable-line no-process-exit
		});

	} else {
		open('http://localhost:8071/tests/tests.html');
		console.log('Serving tests...');
	}
});