Skip to content

test: add integration tests for Teams TypeScript SDK#622

Merged
corinagum merged 4 commits into
mainfrom
cg/integration-tests
Jun 16, 2026
Merged

test: add integration tests for Teams TypeScript SDK#622
corinagum merged 4 commits into
mainfrom
cg/integration-tests

Conversation

@corinagum

Copy link
Copy Markdown
Collaborator

Adds 12 integration tests that make real API calls against the Teams Bot Framework service.

Tests:

  • Activities: create, update, reply, delete (4)
  • Members: get all, get by ID, get paged (3)
  • Conversations: create 1:1, create group (2)
  • Teams: get details, get channels (2)
  • Reactions: add and delete (1)

Setup:

npm install
cp test/integration/.env.example test/integration/.env.botid-prod
# Fill in credentials
npm run test:integration --workspace=@microsoft/teams.integration-tests

Integration tests are isolated from normal npm test (no test script in the workspace, excluded from turbo).

See cross-SDK runbook for provisioning and troubleshooting.

corinagum and others added 2 commits June 15, 2026 16:22
Scaffolds integration test suite that runs against live Teams service
endpoints. Tests validate the TypeScript SDK's HTTP client, auth token
acquisition, and serialization against the real API.

Tests:
- Activities: send, update, delete, reply
- Members: get all, get by ID, get paged
- Conversations: create 1:1
- Teams: get details, get channels
- Reactions: add and remove

Architecture:
- Shared fixture acquires MSAL token and caches members (avoids 429s)
- Sequential execution (shared conversation)
- Env-file based configuration (gitignored)
- Isolated from normal 'npm test' (no 'test' script, only test:integration)

Results: 11/12 pass, 1 skipped (group chat — known service limitation)

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings June 16, 2026 18:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new test/integration workspace containing Jest-based integration tests that make live calls to the Teams Bot Framework service, plus documentation and repo wiring to keep these tests isolated from normal npm test runs.

Changes:

  • Introduces a dedicated @microsoft/teams.integration-tests workspace with Jest + ts-jest configuration and a shared MSAL-based fixture.
  • Adds multiple integration test suites covering activities, members, conversations, teams, and reactions.
  • Updates repo-level configuration/docs to include the new workspace and provide integration-test guidance.

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/integration/tsconfig.json TypeScript compiler config for the integration test workspace.
test/integration/jest.config.ts Jest configuration for running TypeScript integration tests.
test/integration/package.json New workspace package definition and test scripts.
test/integration/.env.example Example environment variables for provisioning/running live integration tests.
test/integration/README.md Setup/run instructions and coverage overview for integration tests.
test/integration/src/fixture.ts Shared MSAL token + SDK client fixture used across suites.
test/integration/src/activities.test.ts Live API tests for activity create/update/delete/reply.
test/integration/src/members.test.ts Live API tests for member list/getById/getPaged.
test/integration/src/conversations.test.ts Live API tests for 1:1 and group conversation creation.
test/integration/src/teams-and-reactions.test.ts Live API tests for team details/channels and reactions add/delete.
package.json Adds test/integration to npm workspaces.
package-lock.json Locks dependencies for the new workspace and workspace linkage.
CONTRIBUTING.MD Adds contributor guidance on when to add integration tests and where they live.
.gitignore Ignores integration-test .env.* files while keeping .env.example tracked.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/integration/README.md Outdated
Comment thread test/integration/README.md Outdated
Comment thread test/integration/.env.example Outdated
Comment thread test/integration/package.json
Comment thread test/integration/src/fixture.ts
Comment thread test/integration/src/fixture.ts
Comment thread test/integration/src/fixture.ts
@corinagum
corinagum added this pull request to the merge queue Jun 16, 2026
Merged via the queue into main with commit 7d686da Jun 16, 2026
6 checks passed
@corinagum
corinagum deleted the cg/integration-tests branch June 16, 2026 22:32
@lilyydu lilyydu mentioned this pull request Jul 16, 2026
lilyydu added a commit that referenced this pull request Jul 16, 2026
## Release v2.0.14

Prepares the stable **2.0.14** release by merging `main` into `release`
and setting `version.json` to the stable version (removing the
`-preview.{height}` suffix).

- Previous release: `2.0.13` (published 2026-06-15)
- Only functional diff vs `main` is `version.json`:
`2.0.14-preview.{height}` → `2.0.14`

## What's in this release

### 🚀 Features
* Flatten client method chains to reduce call hops by @lilyydu in
#634
* Support resetting response streams and streaming error handling by
@lilyydu in #635
* Add `extendedMarkdown` text format value by @singhk97 in
#615

### 🐛 Fixes
* Set `replyToId` for all streaming activities by @lilyydu in
#646
* Use `artifactName` for pipelineArtifact inputs in publish pipeline by
@corinagum in #625

### ♻️ Refactors
* Move `apps` from file-based mixins to real classes by @heyitsaamir in
#633
* Split up Outbound and Inbound Activities by @heyitsaamir in
#639
* Remove `ExperimentalTeamsQuotedReplies` markers by @corinagum in
#621

### 🧪 Tests
* Add integration tests for Teams TypeScript SDK by @corinagum in
#622

### 📚 Docs & Examples
* Migrate examples to the flattened conversation API by @lilyydu in
#637
* Note npm CFS proxy for Microsoft-managed devices by @corinagum in
#638
* Update integration test runbook link to ADO wiki by @corinagum in
#624

### 🔧 Chores & Dependencies
* Bump version to 2.0.14-preview and fix pipeline release job by
@corinagum in #620
* Bump hono from 4.12.21 to 4.12.25 by @dependabot in
#623
* Bump react-router from 7.15.0 to 7.15.1 by @dependabot in
#619
* Bump vite from 6.4.2 to 6.4.3 by @dependabot in
#617

**Full Changelog**:
v2.0.13...prep-release/2.0.14

### After merge
1. Trigger the [release
pipeline](https://dev.azure.com/DomoreexpGithub/Github_Pipelines/_build?definitionId=52&_a=summary)
on `release` with **Public** publish type
2. Bump `main` → `2.0.15-preview.{height}`
3. Create the `v2.0.14` git tag + GitHub Release

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants