mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
27 lines
642 B
JavaScript
27 lines
642 B
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
const assert = require('assert').strict;
|
||
|
const {padutils} = require('../../../static/js/pad_utils');
|
||
|
|
||
|
describe(__filename, function () {
|
||
|
describe('warnDeprecated', function () {
|
||
|
const {warnDeprecated} = padutils;
|
||
|
const backups = {};
|
||
|
|
||
|
before(async function () {
|
||
|
backups.logger = warnDeprecated.logger;
|
||
|
});
|
||
|
|
||
|
afterEach(async function () {
|
||
|
warnDeprecated.logger = backups.logger;
|
||
|
});
|
||
|
|
||
|
it('includes the stack', async function () {
|
||
|
let got;
|
||
|
warnDeprecated.logger = {warn: (stack) => got = stack};
|
||
|
warnDeprecated();
|
||
|
assert(got.includes(__filename));
|
||
|
});
|
||
|
});
|
||
|
});
|