0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/tick-processor/test-tick-processor-cpp-core.js
killagu 38f04d4da1 tools, test: fix prof polyfill readline
`node --prof foo.js` may not print the full profile log file, leaving
the last line broken (for example `tick,`. When that happens, `readline`
will be stuck in an infinite loop. This patch fixes it.

Also introduced `common.isCPPSymbolsNotMapped` to avoid duplicated code
on tick-processor tests.

PR-URL: https://github.com/nodejs/node/pull/18641
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-17 10:06:53 -02:00

21 lines
454 B
JavaScript

'use strict';
const common = require('../common');
if (!common.enoughTestCpu)
common.skip('test is CPU-intensive');
if (common.isCPPSymbolsNotMapped) {
common.skip('C++ symbols are not mapped for this os.');
}
const base = require('./tick-processor-base.js');
base.runTest({
pattern: /MakeContext/,
code: `function f() {
require('vm').createContext({});
setImmediate(function() { f(); });
};
f();`
});