Skip to content

Commit

Permalink
strict null check the test file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Loe committed Jun 20, 2024
1 parent 3e95961 commit 3d98c2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import { launchAuthIntegration, registry } from "@/background/messenger/api";
import { registry } from "@/background/messenger/api";
import oauth2IntegrationDefinition from "@contrib/integrations/automation-anywhere-oauth2.yaml";
import { registryIdFactory } from "@/testUtils/factories/stringFactories";
import { launchAuthIntegration } from "@/background/auth/partnerIntegrations/launchAuthIntegration";

jest.mocked(registry.find).mockResolvedValue({
id: (oauth2IntegrationDefinition!.metadata as any).id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ describe("refreshPartnerAuthentication", () => {
token: "new_test_token",
});
await refreshPartnerAuthentication();
expect(axiosMock.history.post).toHaveLength(1);
const axiosRequestConfig = axiosMock.history.post[0];
expect(axiosMock.history.post).toBeArrayOfSize(1);
const axiosRequestConfig = axiosMock.history.post![0];
expect(axiosRequestConfig).toMatchObject({
method: "post",
url: "https://my.testrefreshurl.com",
Expand Down
1 change: 1 addition & 0 deletions src/tsconfig.strictNullChecks.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"./background/auth/partnerIntegrations/getPartnerPrincipals.ts",
"./background/auth/partnerIntegrations/launchAuthIntegration.test.ts",
"./background/auth/partnerIntegrations/launchAuthIntegration.ts",
"./background/auth/partnerIntegrations/refreshPartnerAuthentication.test.ts",
"./background/auth/partnerIntegrations/refreshPartnerAuthentication.ts",
"./background/auth/partnerIntegrations/types.ts",
"./background/axiosFetch.ts",
Expand Down

0 comments on commit 3d98c2a

Please sign in to comment.