Skip to content

Commit

Permalink
Merge pull request #468 from ably/lint-fix-also-formats
Browse files Browse the repository at this point in the history
make npm lint:fix to also format
  • Loading branch information
vladvelici authored Feb 6, 2025
2 parents fe13e60 + a6ff8d5 commit 7c6bd2e
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
8 changes: 4 additions & 4 deletions demo/api/ably-token-request/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/api/ably-token-request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@netlify/functions": "^2.8.2",
"@types/node": "^22.10.1",
"ably": "^2.5.0",
"ably": "^2.6.3",
"dotenv": "^16.4.5",
"typescript": "^5.7.2"
}
Expand Down
10 changes: 6 additions & 4 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@ably/chat": "file:..",
"ably": "^2.6.2",
"ably": "^2.6.3",
"clsx": "^2.1.1",
"nanoid": "^5.0.9",
"react": "^18.3.1",
Expand Down
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"scripts": {
"lint": "eslint . && npm run cspell",
"lint:fix": "eslint --fix .",
"lint:fix": "eslint --fix .; npm run format",
"format": "prettier --write src test __mocks__ demo/src",
"format:check": "prettier --check src test __mocks__ demo/src",
"test": "vitest run",
Expand Down Expand Up @@ -60,7 +60,7 @@
"node": ">=18.0.0"
},
"peerDependencies": {
"ably": "^2.6.2",
"ably": "^2.6.3",
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
Expand Down
10 changes: 5 additions & 5 deletions test/core/presence.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface TestContext {
chat: ChatClient;
}

// Wait a maximum of 5 seconds for a particular presence event to be received
// Wait a maximum of 20 seconds for a particular presence event to be received
const waitForPresenceEvent = async (
events: PresenceEvent[],
action: PresenceEvents,
Expand All @@ -44,11 +44,11 @@ const waitForPresenceEvent = async (
clearInterval(interval);
const eventType = Array.isArray(action) ? action.join(',') : action;
reject(new Error('Timed out waiting for presence event of type ' + eventType));
}, 5000);
}, 20000);
});
};

// Wait a maximum of 3 seconds to assert that a presence event has not been received
// Wait a maximum of 10 seconds to assert that a presence event has not been received
const assertNoPresenceEvent = async (events: PresenceEvent[], action: PresenceEvents, clientId: string) => {
return new Promise<void>((resolve, reject) => {
const interval = setInterval(() => {
Expand All @@ -65,7 +65,7 @@ const assertNoPresenceEvent = async (events: PresenceEvent[], action: PresenceEv
setTimeout(() => {
clearInterval(interval);
resolve();
}, 3000);
}, 10000);
});
};

Expand Down Expand Up @@ -95,7 +95,7 @@ const waitForEvent = (
});
};

describe('UserPresence', { timeout: 10000 }, () => {
describe('UserPresence', { timeout: 30000 }, () => {
// Setup before each test, create a new Ably Realtime client and a new Room
beforeEach<TestContext>(async (context) => {
context.realtime = ablyRealtimeClient();
Expand Down

0 comments on commit 7c6bd2e

Please sign in to comment.