-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate test framework to vitest (#2769)
Get rid of mocha and upgrade to vitest which is a more modern alternative providing, watch, direct typescript compilation out of the box, expect library and more. Advantage over mocha: - Much better cli - watch mode - better diff - Better extension: - tree organization for files too (not everything flattened) - update in real time the test(no more need to refresh manually to discover where are the tests) - just a little buggy - Compiles typescript directly - provides more expectation apis(like jest) Cons over mocha: - Slower(about 2x) but that means we don't need to build the test as part of build which would speed up that part(not as much as is lost) Todo: - typespec-azure migration
- Loading branch information
1 parent
da99aa9
commit 9c7bf80
Showing
317 changed files
with
3,904 additions
and
4,466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/bundler/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/bundler", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/bundler" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/compiler/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/compiler", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/compiler" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/eslint-config-typespec/vitest_2023-12-27-18-29.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/eslint-config-typespec", | ||
"comment": "Migrate test rules to vitest", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/eslint-config-typespec" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/eslint-plugin/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/eslint-plugin", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/eslint-plugin" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/html-program-viewer/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/html-program-viewer", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/html-program-viewer" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/http/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/http", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/http" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/internal-build-utils/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/internal-build-utils", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/internal-build-utils" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/json-schema/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/json-schema", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/json-schema" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/library-linter/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/library-linter", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/library-linter" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/openapi/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/openapi", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/openapi" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/openapi3/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/openapi3", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/openapi3" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/playground/vitest_2023-12-27-18-29.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/playground", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/playground" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/prettier-plugin-typespec/vitest_2023-12-27-18-29.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/prettier-plugin-typespec", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/prettier-plugin-typespec" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/protobuf/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/protobuf", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/protobuf" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/rest/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/rest", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/rest" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/versioning/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/versioning", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/versioning" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/tmlanguage-generator/vitest_2024-01-02-16-19.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "tmlanguage-generator", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "tmlanguage-generator" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/typespec-vscode/vitest_2023-12-22-02-02.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "typespec-vscode", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "typespec-vscode" | ||
} |
Oops, something went wrong.