test-snapshot-typescript should work with typescript 6
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
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'
}
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test/fixtures/snapshot/typescript-main.js and test/fixtures/snapshot/typescript.js, then run the snapshot test using the TypeScript 6 bundle or Debian package files described in the issue. Check the compiler options and expected snapshot output; done means the test completes without the AssertionError under TypeScript 6.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100