You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Add ESLint Jest (#10261)
This commit is contained in:
@ -68,7 +68,7 @@ describe("Terms", function () {
|
||||
const interactionCallback = jest.fn().mockResolvedValue([]);
|
||||
await startTermsFlow([IM_SERVICE_ONE], interactionCallback);
|
||||
|
||||
expect(interactionCallback).toBeCalledWith(
|
||||
expect(interactionCallback).toHaveBeenCalledWith(
|
||||
[
|
||||
{
|
||||
service: IM_SERVICE_ONE,
|
||||
@ -100,7 +100,7 @@ describe("Terms", function () {
|
||||
await startTermsFlow([IM_SERVICE_ONE], interactionCallback);
|
||||
|
||||
expect(interactionCallback).not.toHaveBeenCalled();
|
||||
expect(mockClient.agreeToTerms).toBeCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
|
||||
expect(mockClient.agreeToTerms).toHaveBeenCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
|
||||
"http://example.com/one",
|
||||
]);
|
||||
});
|
||||
@ -124,7 +124,7 @@ describe("Terms", function () {
|
||||
const interactionCallback = jest.fn().mockResolvedValue(["http://example.com/one", "http://example.com/two"]);
|
||||
await startTermsFlow([IM_SERVICE_ONE], interactionCallback);
|
||||
|
||||
expect(interactionCallback).toBeCalledWith(
|
||||
expect(interactionCallback).toHaveBeenCalledWith(
|
||||
[
|
||||
{
|
||||
service: IM_SERVICE_ONE,
|
||||
@ -135,7 +135,7 @@ describe("Terms", function () {
|
||||
],
|
||||
["http://example.com/one"],
|
||||
);
|
||||
expect(mockClient.agreeToTerms).toBeCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
|
||||
expect(mockClient.agreeToTerms).toHaveBeenCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
|
||||
"http://example.com/one",
|
||||
"http://example.com/two",
|
||||
]);
|
||||
@ -170,7 +170,7 @@ 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);
|
||||
|
||||
expect(interactionCallback).toBeCalledWith(
|
||||
expect(interactionCallback).toHaveBeenCalledWith(
|
||||
[
|
||||
{
|
||||
service: IM_SERVICE_TWO,
|
||||
@ -181,10 +181,10 @@ describe("Terms", function () {
|
||||
],
|
||||
["http://example.com/one"],
|
||||
);
|
||||
expect(mockClient.agreeToTerms).toBeCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
|
||||
expect(mockClient.agreeToTerms).toHaveBeenCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
|
||||
"http://example.com/one",
|
||||
]);
|
||||
expect(mockClient.agreeToTerms).toBeCalledWith(SERVICE_TYPES.IM, "https://imtwo.test", "a token token", [
|
||||
expect(mockClient.agreeToTerms).toHaveBeenCalledWith(SERVICE_TYPES.IM, "https://imtwo.test", "a token token", [
|
||||
"http://example.com/two",
|
||||
]);
|
||||
});
|
||||
|
Reference in New Issue
Block a user