Skip to content

Commit

Permalink
fix(power-doctest): disable config file
Browse files Browse the repository at this point in the history
when babelrc on the project root, power-doctest use it.
It is bug
  • Loading branch information
azu committed Aug 25, 2019
1 parent 76e02af commit f610d2d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/power-doctest/src/power-doctest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ export function convertAST<T extends File>(AST: T, options: convertASTOptions):
});
const result = transformSync(code, {
plugins: ["babel-plugin-espower"],
filename: "./file.js",
sourceFileName: "./file.js",
filename: options.filePath,
sourceFileName: options.filePath,
ast: true,
code: false
code: false,
configFile: false
});
if (!result) {
throw new Error("Fail to convert espower in power-doctest");
Expand Down
3 changes: 3 additions & 0 deletions packages/power-doctest/test/snapshots/async-function/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
async () => {
1; // => 1
};

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

0 comments on commit f610d2d

Please sign in to comment.