0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/fixtures/deprecated-userland-class.js

16 lines
455 B
JavaScript
Raw Normal View History

const util = require('util');
const assert = require('assert');
class deprecatedClass {
}
const deprecated = util.deprecate(deprecatedClass, 'deprecatedClass is deprecated.');
const instance = new deprecated();
const deprecatedInstance = new deprecatedClass();
assert(instance instanceof deprecated);
assert(instance instanceof deprecatedClass);
assert(deprecatedInstance instanceof deprecated);
assert(deprecatedInstance instanceof deprecatedClass);