nodejs/test/parallel/test-repl-memory-deprecatio...

16 lines
388 B
JavaScript
Raw Normal View History

2022-08-16 11:12:47 +08:00
'use strict';
const common = require('../common');
const assert = require('assert');
const repl = require('repl');
testMemory();
function testMemory() {
const server = repl.start({ prompt: '> ' });
const warn = 'REPLServer.memory() is deprecated';
common.expectWarning('DeprecationWarning', warn, 'DEP0082');
assert.strictEqual(server.memory(), undefined);
server.close();
}