-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: #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>
- Loading branch information
Showing
3 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} |