Lines Matching +full:require +full:- +full:common +full:- +full:first
2 const common = require('../common'); constant
3 const assert = require('assert');
4 const { promisify } = require('util');
5 const execFile = promisify(require('child_process').execFile);
7 // Test that --trace-sync-io works. In particular, a warning should be printed
8 // when it is enabled and synchronous I/O happens after the first event loop
10 // happens before the first event loop turn is over.
12 if (process.argv[2] === 'late-sync-io') {
14 require('fs').statSync(__filename);
17 } else if (process.argv[2] === 'early-sync-io') {
18 require('fs').statSync(__filename);
24 { execArgv: ['--trace-sync-io'], variant: 'late-sync-io', warnings: 1 },
25 { execArgv: [], variant: 'late-sync-io', warnings: 0 },
26 { execArgv: ['--trace-sync-io'], variant: 'early-sync-io', warnings: 0 },
27 { execArgv: [], variant: 'early-sync-io', warnings: 0 },
39 })().then(common.mustCall());