Skip to content

Conversation

@Perryvw
Copy link
Member

@Perryvw Perryvw commented Jun 20, 2021

Fixes #1036

@Perryvw Perryvw requested a review from lolleko June 20, 2021 10:34
});
});

describe("getEmitOutDir", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant? Already tested via getEmitPath tests?

const { transpiledFiles } = util.testModule``
.setMainFileName("main.ts")
.addExtraFile("dir/extra.ts", "")
.setOptions({ outDir: path.join(cwd, "tstl-out") })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a var for path.join(cwd, "tstl-out") that can be reused in the asserts below.

const { transpiledFiles } = util.testModule``
.setMainFileName("src/main.ts")
.addExtraFile("src/extra.ts", "")
.setOptions({ rootDir: "src", outDir: path.join(cwd, "tstl-out") })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above code duplication path.join(cwd, "tstl-out")

@Perryvw Perryvw merged commit 8d9c8af into master Jun 21, 2021
@Perryvw Perryvw deleted the bugfix/emitoutdir branch June 21, 2021 20:06
sanikoyes pushed a commit to sanikoyes/TypeScriptToLua that referenced this pull request Sep 24, 2021
…peScriptToLua#1038)

* Fix getEmitOutDir not using project root if no outDir is provided

* Removed redundant tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bundle output path is relative to source dir instead of projectRoot, if no rootDir is provided

2 participants