Remove sinon and bump npm
This commit is contained in:
parent
0f82b76c09
commit
14020125b9
71564
package-lock.json
generated
71564
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -98,7 +98,7 @@
|
||||
"lerna": "^3.22.1",
|
||||
"mini-css-extract-plugin": "^1.5.1",
|
||||
"minimist": "^1.2.3",
|
||||
"npm": "^6.14.9",
|
||||
"npm": "^7.19.0",
|
||||
"po-loader": "^0.5.0",
|
||||
"po2json": "^1.0.0-beta",
|
||||
"postcss-clean": "^1.1.0",
|
||||
@ -107,7 +107,6 @@
|
||||
"run-headless-chromium": "^0.1.1",
|
||||
"sass": "^1.32.12",
|
||||
"sass-loader": "^11.0.1",
|
||||
"sinon": "^9.2.4",
|
||||
"style-loader": "^0.23.1",
|
||||
"webpack": "^5.36.1",
|
||||
"webpack-cli": "^4.7.2",
|
||||
|
@ -172,11 +172,12 @@ describe("Service Discovery", function () {
|
||||
function (done, _converse) {
|
||||
|
||||
const { Strophe } = converse.env;
|
||||
sinon.spy(_converse.api, "trigger");
|
||||
spyOn(_converse.api, "trigger").and.callThrough();
|
||||
_converse.disco_entities.get(_converse.domain).features.create({'var': Strophe.NS.MAM});
|
||||
expect(_converse.api.trigger.called).toBe(true);
|
||||
expect(_converse.api.trigger.args[0][0]).toBe('serviceDiscovered');
|
||||
expect(_converse.api.trigger.args[0][1].get('var')).toBe(Strophe.NS.MAM);
|
||||
expect(_converse.api.trigger).toHaveBeenCalled();
|
||||
const last_call = _converse.api.trigger.calls.all().pop();
|
||||
expect(last_call.args[0]).toBe('serviceDiscovered');
|
||||
expect(last_call.args[1].get('var')).toBe(Strophe.NS.MAM);
|
||||
done();
|
||||
}));
|
||||
});
|
||||
|
@ -250,7 +250,7 @@ describe("A Chat Message", function () {
|
||||
// Ideally we wouldn't have to filter out headline
|
||||
// messages, but Prosody gives them the wrong 'type' :(
|
||||
spyOn(converse.env.log, 'info');
|
||||
sinon.spy(_converse.api.chatboxes, 'get');
|
||||
spyOn(_converse.api.chatboxes, 'get');
|
||||
const msg = $msg({
|
||||
from: 'montague.lit',
|
||||
to: _converse.bare_jid,
|
||||
@ -261,9 +261,7 @@ describe("A Chat Message", function () {
|
||||
expect(converse.env.log.info).toHaveBeenCalledWith(
|
||||
"handleMessageStanza: Ignoring incoming server message from JID: montague.lit"
|
||||
);
|
||||
expect(_converse.api.chatboxes.get.called).toBeFalsy();
|
||||
// Remove sinon spies
|
||||
_converse.api.chatboxes.get.restore();
|
||||
expect(_converse.api.chatboxes.get).not.toHaveBeenCalled();
|
||||
done();
|
||||
}));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user