Clean up some unit test logs (#7857)

* kill some unit test logs in arrays-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove mock logs that are asserted against anyway

* remove more logs

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix safeCOunterpartTranslate warnings in tests

Signed-off-by: Kerry Archibald <kerrya@element.io>

* more safeCounterpartTranslate warnings

Signed-off-by: Kerry Archibald <kerrya@element.io>

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove more logs

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add helper

Signed-off-by: Kerry Archibald <kerrya@element.io>

* naming

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-02-21 17:57:44 +01:00 committed by GitHub
parent e2827b4082
commit 8b9263c808
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 108 additions and 91 deletions

View file

@ -53,7 +53,6 @@ describe('Terms', function() {
});
const interactionCallback = jest.fn().mockResolvedValue([]);
await startTermsFlow([IM_SERVICE_ONE], interactionCallback);
console.log("interaction callback calls", interactionCallback.mock.calls[0]);
expect(interactionCallback).toBeCalledWith([
{
@ -80,7 +79,6 @@ describe('Terms', function() {
const interactionCallback = jest.fn();
await startTermsFlow([IM_SERVICE_ONE], interactionCallback);
console.log("agreeToTerms call", MatrixClientPeg.get().agreeToTerms.mock.calls[0]);
expect(interactionCallback).not.toHaveBeenCalled();
expect(MatrixClientPeg.get().agreeToTerms).toBeCalledWith(
@ -107,8 +105,6 @@ describe('Terms', function() {
const interactionCallback = jest.fn().mockResolvedValue(["http://example.com/one", "http://example.com/two"]);
await startTermsFlow([IM_SERVICE_ONE], interactionCallback);
console.log("interactionCallback call", interactionCallback.mock.calls[0]);
console.log("agreeToTerms call", MatrixClientPeg.get().agreeToTerms.mock.calls[0]);
expect(interactionCallback).toBeCalledWith([
{
@ -154,10 +150,6 @@ describe('Terms', function() {
const interactionCallback = jest.fn().mockResolvedValue(["http://example.com/one", "http://example.com/two"]);
await startTermsFlow([IM_SERVICE_ONE, IM_SERVICE_TWO], interactionCallback);
console.log("getTerms call 0", MatrixClientPeg.get().getTerms.mock.calls[0]);
console.log("getTerms call 1", MatrixClientPeg.get().getTerms.mock.calls[1]);
console.log("interactionCallback call", interactionCallback.mock.calls[0]);
console.log("agreeToTerms call", MatrixClientPeg.get().agreeToTerms.mock.calls[0]);
expect(interactionCallback).toBeCalledWith([
{