Skip to content

Commit

Permalink
test: fix custom transformers test and run tests on TypeScript v4.4.2…
Browse files Browse the repository at this point in the history
… as well
  • Loading branch information
wessberg committed Nov 18, 2021
1 parent 4745105 commit 6821ee0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
"typescript-4-0-3": "npm:typescript@4.0.3",
"typescript-4-1-2": "npm:typescript@4.1.2",
"typescript-4-2-4": "npm:typescript@4.2.4",
"typescript-4-3-5": "npm:typescript@4.3.5"
"typescript-4-3-5": "npm:typescript@4.3.5",
"typescript-4-4-2": "npm:typescript@4.4.2"
},
"dependencies": {
"@rollup/pluginutils": "^4.1.1",
Expand Down
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/custom-transformers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {ensureNodeFactory} from "compatfactory";

test.serial("Supports Custom Transformers, including on bundled declarations. #1", withTypeScript, async (t, {typescript}) => {
const transformer: (ts: typeof TS) => TS.TransformerFactory<TS.SourceFile> = ts => context => sourceFile => {
const factory = (context.factory as TS.NodeFactory | undefined) ?? ts;
const factory = ensureNodeFactory(context.factory ?? ts);

function visitNode(node: TS.Node): TS.VisitResult<TS.Node> {
if (ts.isClassDeclaration(node)) {
Expand Down

0 comments on commit 6821ee0

Please sign in to comment.