Skip to content

Commit

Permalink
get the tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Feb 7, 2025
1 parent af1c988 commit 15e454e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ class XMTPModule : Module() {
a.apply { set(i, v.toByte()) }
}
val historySyncUrl = authOptions.historySyncUrl
?: when (authOptions.environment) {
"production" -> "https://message-history.production.ephemera.network/"
"local" -> "http://10.0.2.2:5558"
else -> "https://message-history.dev.ephemera.network/"
}
return ClientOptions(
api = apiEnvironments(authOptions.environment, authOptions.appVersion),
preAuthenticateToInboxCallback = preAuthenticateToInboxCallback,
Expand Down
14 changes: 7 additions & 7 deletions example/src/tests/conversationTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,19 +467,19 @@ test('can filter sync all by consent', async () => {
const boConvosFilteredAllowedOrDenied =
await boClient.conversations.syncAllConversations(['allowed', 'denied'])

assert(boConvos === 4, `Conversation length should be 4 but was ${boConvos}`)
assert(boConvos === 5, `Conversation length should be 5 but was ${boConvos}`)
assert(
boConvosFilteredAllowed === 2,
`Conversation length should be 2 but was ${boConvosFilteredAllowed}`
boConvosFilteredAllowed === 3,
`Conversation length should be 3 but was ${boConvosFilteredAllowed}`
)
assert(
boConvosFilteredUnknown === 1,
`Conversation length should be 1 but was ${boConvosFilteredUnknown}`
boConvosFilteredUnknown === 2,
`Conversation length should be 2 but was ${boConvosFilteredUnknown}`
)

assert(
boConvosFilteredAllowedOrDenied === 3,
`Conversation length should be 3 but was ${boConvosFilteredAllowedOrDenied}`
boConvosFilteredAllowedOrDenied === 4,
`Conversation length should be 4 but was ${boConvosFilteredAllowedOrDenied}`
)

return true
Expand Down
2 changes: 1 addition & 1 deletion example/src/tests/groupPermissionsTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ test('creating a group with invalid permissions should fail', async () => {
updateGroupNamePolicy: 'admin',
updateGroupDescriptionPolicy: 'allow',
updateGroupImagePolicy: 'admin',
updateMessageExpirationPolicy: 'admin',
updateMessageDisappearingPolicy: 'admin',
}

// Bo creates a group with Alix and Caro
Expand Down
4 changes: 2 additions & 2 deletions example/src/tests/groupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1142,8 +1142,8 @@ test('can list groups with params', async () => {
`List length should be 1 but was ${boGroupsLimit.length}`
)
assert(
boGroupsLimit[0].id === boGroup1.id,
`Group should be ${boGroup1.id} but was ${boGroupsLimit[0].id}`
boGroupsLimit[0].id === boGroup2.id,
`Group should be ${boGroup2.id} but was ${boGroupsLimit[0].id}`
)

return true
Expand Down

0 comments on commit 15e454e

Please sign in to comment.