Skip to content

Commit

Permalink
Merge pull request #359 from sergeyWh1te/bump-axios
Browse files Browse the repository at this point in the history
feat: bump axios to 1.6.2
  • Loading branch information
haseebrabbani authored Dec 8, 2023
2 parents 184385e + f228dc8 commit 9b4a742
Show file tree
Hide file tree
Showing 11 changed files with 2,830 additions and 5,136 deletions.
2 changes: 1 addition & 1 deletion cli/commands/disable/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe("disable", () => {

it("disables agent in agent registry contract", async () => {
const systemTime = new Date()
jest.useFakeTimers('modern').setSystemTime(systemTime)
jest.useFakeTimers().setSystemTime(systemTime)
mockAgentRegistry.agentExists.mockReturnValueOnce(true)
mockAgentRegistry.isEnabled.mockReturnValueOnce(true)
const mockPrivateKey = "0x4567"
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/enable/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe("enable", () => {

it("enables agent in agent registry contract", async () => {
const systemTime = new Date()
jest.useFakeTimers('modern').setSystemTime(systemTime)
jest.useFakeTimers().setSystemTime(systemTime)
mockAgentRegistry.agentExists.mockReturnValueOnce(true)
mockAgentRegistry.isEnabled.mockReturnValueOnce(false)
const mockPrivateKey = "0x4567"
Expand Down
4 changes: 2 additions & 2 deletions cli/commands/publish/push.to.registry.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("pushToRegistry", () => {

it("adds agent to registry if it does not already exist", async () => {
const systemTime = new Date()
jest.useFakeTimers('modern').setSystemTime(systemTime)
jest.useFakeTimers().setSystemTime(systemTime)
mockAgentRegistry.getAgent.mockReturnValueOnce({created: false})
mockFromWallet.getAddress.mockReturnValue('0x123')
mockFromWallet.getBalance.mockReturnValueOnce(BigNumber.from(1))
Expand All @@ -88,7 +88,7 @@ describe("pushToRegistry", () => {

it("updates agent in registry if it already exists", async () => {
const systemTime = new Date()
jest.useFakeTimers('modern').setSystemTime(systemTime)
jest.useFakeTimers().setSystemTime(systemTime)
mockAgentRegistry.getAgent.mockReturnValueOnce({created: true, owner: mockFromAddress})
mockFromWallet.getAddress.mockReturnValue('0x123')
mockFromWallet.getBalance.mockReturnValueOnce(BigNumber.from(1))
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/publish/upload.manifest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe("uploadManifest", () => {

it("uploads signed manifest to ipfs and returns ipfs reference", async () => {
const systemTime = new Date();
jest.useFakeTimers("modern").setSystemTime(systemTime);
jest.useFakeTimers().setSystemTime(systemTime);
mockFilesystem.existsSync.mockReturnValueOnce(true);
mockFilesystem.statSync.mockReturnValueOnce({ size: 1 });
const mockDocumentationFile = JSON.stringify({ some: "documentation" });
Expand Down
4 changes: 2 additions & 2 deletions cli/commands/push/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("push", () => {
const mockPrivateKey = "0x4567"
mockGetCredentials.mockReturnValueOnce({ privateKey: mockPrivateKey})
const systemTime = new Date()
jest.useFakeTimers('modern').setSystemTime(systemTime)
jest.useFakeTimers().setSystemTime(systemTime)
const mockImageRef = "abc123"
mockUploadImage.mockReturnValueOnce(mockImageRef)
const mockManifestRef = "def456"
Expand Down Expand Up @@ -39,7 +39,7 @@ describe("push", () => {
const mockPrivateKey = "0x4567"
mockGetCredentials.mockReturnValueOnce({ privateKey: mockPrivateKey})
const systemTime = new Date()
jest.useFakeTimers('modern').setSystemTime(systemTime)
jest.useFakeTimers().setSystemTime(systemTime)
const mockImageRef = "abc123"
mockUploadImage.mockReturnValueOnce(mockImageRef)
const mockManifestRef = "def456"
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/run/run.live.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("runLive", () => {
mockRunHandlersOnAlert,
mockSleep
);
jest.useFakeTimers("modern").setSystemTime(systemTime);
jest.useFakeTimers().setSystemTime(systemTime);
});

afterAll(() => {
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/run/server/agent.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe("AgentController", () => {
beforeEach(() => resetMocks())

beforeAll(() => {
jest.useFakeTimers('modern').setSystemTime(systemTime)
jest.useFakeTimers().setSystemTime(systemTime)
})

afterAll(() => {
Expand Down
2 changes: 1 addition & 1 deletion cli/utils/get.alert.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("getAlert", () => {

it("invokes getAlerts query and returns alerts", async () => {
const systemTime = new Date();
jest.useFakeTimers("modern").setSystemTime(systemTime);
jest.useFakeTimers().setSystemTime(systemTime);
mockGetAlerts.mockReturnValue({
alerts: [mockAlert],
});
Expand Down
4 changes: 2 additions & 2 deletions cli/utils/get.trace.data.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe("getTraceData", () => {

it("returns block trace data when requesting block number", async () => {
const systemTime = new Date()
jest.useFakeTimers('modern').setSystemTime(systemTime)
jest.useFakeTimers().setSystemTime(systemTime)
const mockTraces = ['some block trace data']
mockAxios.post.mockReturnValueOnce({ data: { result: mockTraces }})

Expand All @@ -88,7 +88,7 @@ describe("getTraceData", () => {

it("returns transaction trace data when requesting transaction hash", async () => {
const systemTime = new Date()
jest.useFakeTimers('modern').setSystemTime(systemTime)
jest.useFakeTimers().setSystemTime(systemTime)
const mockTraces = ['some transaction trace data']
mockAxios.post.mockReturnValueOnce({ data: { result: mockTraces }})

Expand Down
Loading

0 comments on commit 9b4a742

Please sign in to comment.