Skip to content

Commit

Permalink
chore: add Node 20 to CI (#652)
Browse files Browse the repository at this point in the history
Co-authored-by: Evan Hahn <[email protected]>
  • Loading branch information
achou11 and EvanHahn authored May 20, 2024
1 parent 46617fb commit 0afd07f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version:
- '18.x'
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
9 changes: 6 additions & 3 deletions test-e2e/device-info.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// @ts-check
import { test } from 'brittle'
import { randomBytes } from 'crypto'
import { once } from 'node:events'
import { KeyManager } from '@mapeo/crypto'
import RAM from 'random-access-memory'
import Fastify from 'fastify'
import { pEvent } from 'p-event'
import { connectPeers, createManagers, waitForPeers } from './utils.js'

import { MapeoManager } from '../src/mapeo-manager.js'
Expand Down Expand Up @@ -163,8 +163,11 @@ test('device info sent to peers', async (t) => {

const otherManagersReceivedNameChangePromise = Promise.all(
otherManagers.map(async (manager) => {
const [peersFromEvent] = await once(manager, 'local-peers')
t.is(peersFromEvent.find(isChangedPeer)?.name, 'new name')
await pEvent(
manager,
'local-peers',
(peers) => peers.find(isChangedPeer)?.name === 'new name'
)

const updatedLocalPeers = await manager.listLocalPeers()
t.is(updatedLocalPeers.find(isChangedPeer)?.name, 'new name')
Expand Down

0 comments on commit 0afd07f

Please sign in to comment.