Skip to content

Commit

Permalink
test: use t.cloneNode
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jul 28, 2021
1 parent 3073f58 commit 0dca513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-traverse/test/replacement.js
Expand Up @@ -122,7 +122,7 @@ describe("path/replacement", function () {
OptionalMemberExpression(path) {
path.node.type = "MemberExpression";
// force `replaceWith` to replace `path.node`
path.replaceWith(path.node.__clone());
path.replaceWith(t.cloneNode(path.node));
path.parentPath.ensureBlock();

const aQuestionDotBNode = path.node.object.expression;
Expand Down

0 comments on commit 0dca513

Please sign in to comment.