diff --git a/package.json b/package.json index efb1683..53e95e9 100644 --- a/package.json +++ b/package.json @@ -36,11 +36,11 @@ "devDependencies": { "@mercuriusjs/federation": "^5.0.0", "@mercuriusjs/gateway": "^5.0.0", - "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/fake-timers": "^15.1.0", "@types/node": "^25.0.2", "@types/ws": "^8.5.10", - "@typescript-eslint/eslint-plugin": "^5.30.3", - "@typescript-eslint/parser": "^5.30.3", + "@typescript-eslint/eslint-plugin": "^8.54.0", + "@typescript-eslint/parser": "^8.54.0", "autocannon": "^8.0.0", "borp": "^0.21.0", "concurrently": "^9.0.0", @@ -49,9 +49,9 @@ "pre-commit": "^1.2.2", "snazzy": "^9.0.0", "standard": "^17.1.0", - "tsd": "^0.32.0", + "tsd": "^0.33.0", "typescript": "^5.4.2", - "wait-on": "^8.0.0" + "wait-on": "^9.0.3" }, "dependencies": { "@fastify/error": "^4.0.0", diff --git a/test/refresh.js b/test/refresh.js index b5b4139..9a25032 100644 --- a/test/refresh.js +++ b/test/refresh.js @@ -195,12 +195,14 @@ describe('gateway refresh', () => { messageService.graphql.replaceSchema(buildFederationSchema(newSchema)) messageService.graphql.defineResolvers(resolvers) - await clock.tickAsync(2000) + // Tick past the polling interval and allow async operations to settle + await clock.tickAsync(3000) - // We need the event loop to actually spin twice to + // We need the event loop to actually spin multiple times to // be able to propagate the change - await immediate() - await immediate() + for (let i = 0; i < 10; i++) { + await immediate() + } { const res = await gateway.inject({