test-snapshot-typescript should work with typescript 6
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
Version
24.15.0
Platform
Linux lal 7.0.7+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 7.0.7-1 (2026-05-15) x86_64 GNU/Linux
Subsystem
test
What steps will reproduce the bug?
Replace test/fixtures/snapshot/typescript.js by typescript 6 bundle.
How often does it reproduce? Is there a required condition?
As a distributor, we avoid bundled software when not strictly necessary.
test/fixtures/snapshot/typescript.js
is such a thing. Instead, I use a copy of the node-typescript debian package files, setup before the tests.
What is the expected behavior? Why is that the expected behavior?
No test error.
What do you see instead?
105s AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
105s + actual - expected
105s
105s + '"use strict";\n' +
105s + 'class VirtualPoint {\n' +
105s + ' x;\n' +
105s + ' y;\n' +
105s + ' constructor(x, y) {\n' +
105s - 'var VirtualPoint = /** @class */ (function () {\n' +
105s - ' function VirtualPoint(x, y) {\n' +
105s ' this.x = x;\n' +
105s ' this.y = y;\n' +
105s ' }\n' +
105s + '}\n' +
105s + 'const newVPoint = new VirtualPoint(13, 56);\n'
105s - ' return VirtualPoint;\n' +
105s - '}());\n' +
105s - 'var newVPoint = new VirtualPoint(13, 56);\n'
Additional information
Something like this could help
--- a/test/fixtures/snapshot/typescript-main.js
+++ b/test/fixtures/snapshot/typescript-main.js
@@ -20,7 +20,10 @@
source,
{
compilerOptions: {
- module: ts.ModuleKind.CommonJS
+ module: ts.ModuleKind.CommonJS,
+ strict: false,
+ alwaysStrict: false,
+ target: 'es5'
}
});
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
test/fixtures/snapshot/typescript-main.js と test/fixtures/snapshot/typescript.js から始め、issue に記載されている TypeScript 6 バンドルまたは Debian パッケージファイルを使って snapshot テストを実行します。コンパイラーオプションと期待される snapshot 出力を確認します。TypeScript 6 で AssertionError が発生せずにテストが完了すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- testing-qa
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 72/100