git ssb

0+

cel-desktop / ssb-pkg



Tree: 65191f9a9664f013ebe726bb95a1a54b086e1bd5

Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-79-npm / v8flags / v8flags.js

669 bytesRaw
1/* eslint-disable no-underscore-dangle */
2
3'use strict';
4
5var cp = require('child_process');
6
7require('module')._extensions['.json'] = function () {
8 throw new Error('prevent loading json cache');
9};
10
11var execFileCalled = false;
12var execFileSave = cp.execFile;
13
14cp.execFile = function () {
15 execFileCalled = true;
16 execFileSave.apply(cp, arguments); // eslint-disable-line prefer-rest-params
17};
18
19setTimeout(function () {
20 var v8flags = require('v8flags');
21 v8flags(function (error, results) {
22 if (error) return;
23 if (!Array.isArray(results)) return;
24 if (results.length < 6) return;
25 if (!execFileCalled) return;
26 console.log('ok');
27 });
28}, 500);
29

Built with git-ssb-web