-
Notifications
You must be signed in to change notification settings - Fork 38
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
test: library integration tests #1725
Conversation
f248a91
to
53c3a0a
Compare
7bea4b5
to
5bcbf47
Compare
5bcbf47
to
ab8a8f6
Compare
bfce00d
to
8f216a6
Compare
untouchedApp, | ||
untouchedAppPath, | ||
untouchedLib, | ||
untouchedLibPath, |
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.
as far as I can tell we'll never have to make different check between untouchedApp
and untouchedLib
. We always want to check that they are untouched no matter the test
So I would suggest to simplify the tests to only export an array of paths to be checked as untouched
[untouchedAppPath, untouchedLibPath]
we could even consider writing a custom matcher to make it more readable
expect(gitDiff).not.toHaveTouched(path)
or something
59eb752
to
b75364f
Compare
e720621
to
a1a8d96
Compare
a1a8d96
to
a2b262a
Compare
@@ -116,7 +116,7 @@ describe('Create new sdk command', () => { | |||
expect(() => | |||
packageManagerExec({ | |||
script: 'schematics', | |||
args: ['@ama-sdk/schematics:typescript-core', '--spec-path', path.join(path.relative(sdkPackagePath, sdkFolderPath), 'swagger-spec.yml')] | |||
args: ['@ama-sdk/schematics:typescript-core', '--spec-path', path.join(path.relative(sdkPackagePath, sdkFolderPath).split(path.sep).join(path.posix.sep), 'swagger-spec.yml')] |
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.
Not sure to understand this change because the path.join
will retransform to \
on Windows.
Maybe you wanted to change it to path.posix.join
as well
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.
I think I don't need .split(path.sep).join(path.posix.sep)
at all here. Will remove it. It should be OS specific.
a2b262a
to
7e994af
Compare
7e994af
to
9a9e757
Compare
9a9e757
to
d0d3d6a
Compare
Proposed change
Enhance the integration test campaign with tests for libraries.
@o3r/create
should generate a project with a library@o3r/workspace
schematic for app and lib. Currently in create int tests, to be moved in workspace ones. feat(sdk): generate an sdk with spec from npm #1678 should be merged first.Ensure test coverage for libs (similar to what we have for apps) and add assertions for app tests for: