Skip to content

Commit 67a7ec7

Browse files
committed
v1.3.1 return output test file name to caller
1 parent 5b60b51 commit 67a7ec7

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Changelog
22

3-
## v1.2.0
3+
## v1.3.1
4+
5+
- return test output filename from `run()` function
6+
7+
## v1.3.0
48
- #2 support for ts and tsx components with prop types parsing
59
- #5 add an option `--outputDir` to specify a custom output directory relative to the cwd() or absolute path
6-
## v1.1.0
710

11+
## v1.1.0
812
- #3 Support for static methods in classes
913
- #4 .toBeDefined instead of (or in addition to) .toBeTruthy
1014
- #6 migrate tests from jasmine to Jest, makes a lot of sense for this project

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jest-test-gen",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Generator of jest unit test with all imports mocked and tests stub for every class and function exported",
55
"keywords": [
66
"jest",

src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ export function run(args: minimist.ParsedArgs, opts?: TRunOptions) {
4848
return output;
4949
}
5050
console.log('Writing generated test file: ', specFileName);
51-
return writeFileSync(specFileName, output);
51+
writeFileSync(specFileName, output);
52+
return specFileName;
5253
}

0 commit comments

Comments
 (0)