diff options
author | Lance Ball <lball@redhat.com> | 2017-10-16 17:24:17 -0400 |
---|---|---|
committer | Lance Ball <lball@redhat.com> | 2017-10-19 14:58:26 -0400 |
commit | 7a29f440714e443a24bfe312ef9c799e0b821b0a (patch) | |
tree | f6f0b6b335dd09c04149b5f5fb4be75b20435906 /test/parallel/test-repl-memory-deprecation.js | |
parent | 76abf0fae0d015bd2b12d94fdd69bb4a4b1ed75d (diff) | |
download | android-node-v8-7a29f440714e443a24bfe312ef9c799e0b821b0a.tar.gz android-node-v8-7a29f440714e443a24bfe312ef9c799e0b821b0a.tar.bz2 android-node-v8-7a29f440714e443a24bfe312ef9c799e0b821b0a.zip |
repl: deprecate REPLServer.prototype.memory
This method is only useful for the internal mechanics of the REPLServer
and does not need to be exposed in user space. It was previously not
documented, so I believe a Runtime deprecation makes sense.
PR-URL: https://github.com/nodejs/node/pull/16242
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'test/parallel/test-repl-memory-deprecation.js')
-rw-r--r-- | test/parallel/test-repl-memory-deprecation.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/parallel/test-repl-memory-deprecation.js b/test/parallel/test-repl-memory-deprecation.js new file mode 100644 index 0000000000..9993360a28 --- /dev/null +++ b/test/parallel/test-repl-memory-deprecation.js @@ -0,0 +1,15 @@ +'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); + assert.strictEqual(server.memory(), undefined); + server.close(); +} |