Skip to content

Conversation

@stephen-carter-at-sf
Copy link
Contributor

No description provided.

this.validateEnvironment(nodeVersion);
this.config = config;
this.tempFolder = new TempFolder(fileSystem);
/* istanbul ignore next */
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you clarify why this needed the ignore?

Copy link
Contributor Author

@stephen-carter-at-sf stephen-carter-at-sf Sep 19, 2025

Choose a reason for hiding this comment

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

The callback is really what's ignored. The test could never measure this because the node process is on exit when the call back is fired. So no way to cover this with a unit test. Demo (end-to-end) shows things working though.

const describeOptions: engApi.DescribeOptions = {
workspace: engApiWorkspace,
workingFolder: await this.tempFolder.createSubfolder(describeWorkingFolderName, engineName),
workingFolder: workingFolder,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
workingFolder: workingFolder,
workingFolder,

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice cleanup 😎

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually find that this syntax is super confusing and it ties the variable name to the field name. So I personally choose not to use this type of syntax from javascript typically. Just a personal preference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For example, if I use my editor to rename a variable - it causes issues if I have "workingFolder" as both the fieldname and the variable. I might not want to change the field name... but may want to change the variable name and editors don't know this typically and get it wrong. Sometimes convenience and short code causes bugs... which is why I love static typing as well. :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

Works for me!

export interface TempFolder {
getPath(): Promise<string>;
createSubfolder(...subfolderPathSegs: string[]): Promise<string>;
export interface FileSystem {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is good - I feel like it could use elevating out of utils.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it is an implementation detail utility in my opinion.

Copy link
Contributor

@randi274 randi274 left a comment

Choose a reason for hiding this comment

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

This will be great to for us to add for some additional debugging support!

@stephen-carter-at-sf stephen-carter-at-sf merged commit ccac913 into dev Sep 19, 2025
7 checks passed
@stephen-carter-at-sf stephen-carter-at-sf deleted the sc/W-19397375 branch September 19, 2025 16:16
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.

3 participants