typescript-expect-plugin icon indicating copy to clipboard operation
typescript-expect-plugin copied to clipboard

Not support import in ts file

Open jasonHzq opened this issue 4 years ago • 0 comments

The executeTest function require tmp file by ts-node. So if there is import clause in typescript file it won't working!

import { minus } from "./utils";

/**
 * @expect [2, 4] toBe 6
 * @expect [2, 2] toBeGreaterThan 3
 * @expect [2, 2] toBeLessThan 3
 * @expect [2, 22] toEqual 24
 */
export function sum(a: number, b: number) {
  return minus(a, b) + b * 2;
}

jasonHzq avatar Jul 21 '20 06:07 jasonHzq