git ssb

0+

cel-desktop / ssb-pkg



Tree: d456a6cc8589489e558e6164750474ed2cfc961e

Files: d456a6cc8589489e558e6164750474ed2cfc961e / test / test-79-npm / v8flags / v8flags@2.1.1.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