Skip to content

New testing framework - #7151

Merged
Timothee Guerin (timotheeguerin) merged 62 commits into
microsoft:mainfrom
timotheeguerin:tester-v2
Jun 24, 2025
Merged

Timothee Guerin (timotheeguerin) merged 62 commits into
microsoft:mainfrom
timotheeguerin:tester-v2

Conversation

@timotheeguerin

@timotheeguerin Timothee Guerin (timotheeguerin) commented Apr 28, 2025 •

Copy link
Copy Markdown
Member

Tentative improvement of the testing framework for TypeSpec using the idea here https://gist.github.com/timotheeguerin/e218fd2079fb331db31bc0a5a70dc539

Todo:

  • Add tests
  • Figure out the program on the static function
  • Better type collection
  • Add doc comments on all the types
  • Check experiences for emitters(calling $onEmit)
  • Double check the async fs contruction if we can have a better pattern?
  • Generalize Filesystem(add raw file vs js file)
  • Emitter tester should have the same pipe functions as the base tester

@github-actions

github-actions Bot commented Apr 28, 2025 •

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • ✅ @typespec/compiler
  • ✅ @typespec/http
  • ✅ @typespec/openapi
  • ✅ @typespec/openapi3
  • ✅ @typespec/rest
  • ✅ @typespec/sse
  • ✅ @typespec/streams
  • ✅ @typespec/versioning
  • ✅ @typespec/xml
Show changes

@typespec/compiler - feature ✏️

[API] Addition of a new testing framework. See https://typespec.io/docs/extending-typespec/testing

@typespec/http - internal ✏️

Migrated to new tester

@typespec/openapi - internal ✏️

Migrated to new tester

@typespec/openapi3 - internal ✏️

Migrated to new tester

@typespec/rest - internal ✏️

Migrated to new tester

@typespec/sse - internal ✏️

Migrated to new tester

@typespec/streams - internal ✏️

Migrated to new tester

@typespec/versioning - internal ✏️

Migrated to new tester

@typespec/xml - internal ✏️

Migrated to new tester

Comment thread packages/compiler/src/testing/test-host-v2.ts Outdated
@azure-sdk

Azure SDK Bot (azure-sdk) commented Apr 28, 2025 •

Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Comment thread website/src/content/docs/docs/extending-typespec/testing.mdx Outdated
Comment thread website/src/content/docs/docs/extending-typespec/testing.mdx Outdated
Comment thread website/src/content/docs/docs/extending-typespec/testing.mdx
Comment thread website/src/content/docs/docs/extending-typespec/testing.mdx Outdated
Comment thread website/src/content/docs/docs/extending-typespec/testing.mdx
Comment thread website/src/content/docs/docs/extending-typespec/basics.md
Comment thread packages/http/test/typekit/http-request.test.ts Outdated
Co-authored-by: Christopher Radek <14189820+chrisradek@users.noreply.github.com>
Comment thread packages/compiler/src/testing/types.ts Outdated
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