-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Node V16 build and compatibility #64
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devinea instead of using a new library to delete the debug folder before all tests, could we instead change the debugging approach and only commit the folders to the file system if debug mode is enabled?
It would remove the requirement to delete anything (btw I think that was also the initial implementation of template tests by @ullasholla )
@tobiasqueck that is sort of a separate issue. In debug mode the dir stills needs to be deleted. Fs api's have a breaking change so it is easier to switch to fs-extra or rimraf for consistent API across versions. |
While I agree that this is kind of a separate issue, I saw it while reviewing this code and, I don't think it is a good idea to fix an issue that only exists because of another deeper issue: we have unit tests that rely on the file system. To be precise, not the tests itself rely on it but test preparation method that do things that are not related to the tests but for a very different problem: generating artifacts to manually review them.
No, there shouldn't be the need to delete anything because the tests will not write anything to the filestystem and they also don't rely on the file system. Only the debug mode would commit/write data to the fs, so that a developer can review. Under a normal (not debug) run nothing is ever written. |
@tobiasqueck - Based on our discussion I have added the UX_DEBUG env to control writing the test-output or not via fs-commit. Since the test folders should be deleted anyway when UX_DEBUG is either true or false I've kept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- checked that it works even if the
test-output
folder doesn't exist - reviewed the tests and verified that no data is written to the file system if one is not running in debug mode
- looked at general coding style and all looks good to me
- I did not check that data is written to the filesystem if it runs in debug mode
@devinea , what's the breaking change in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, thanks.
There's one minor formatting change required (there's a suggestion that can be committed directly, if you're ok with it).
There's a comment about abstracting common code in the tests. Up to you how you handle this.
I'm curious about the breaking change in the fs
API though. This might have an impact on our other code. Mind posting a link or two about it please?
Co-authored-by: Ullas Holla <212316+ullasholla@users.noreply.github.com>
32bb5fd
Applied. Thanks.
Yeah makes sense. Can look at that in another PR.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved again. Only formatting changes since my initial review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @devinea, looks good.
* main: update(FF): Updates FF Worklist controllers and tests (#63) fix: app-id creation at scaffolding time in Component.js (fixes #70) (#77) Add Node V16 build and compatibility (#64) chore: set version of all modules to v0.9.0 (#71) chore: add github codeowners file (#58) # Conflicts: # .github/workflows/pipeline.yml # packages/fiori-freestyle/package.json # pnpm-lock.yaml
Adapt code due to API change in node 16.
https://github.com/nodejs/node/pull/37216/files#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2R1053-R1055
Only write files to disk if UX_DEBUG environment variable is set when running unit tests.