-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): keep version for third party preset
- Loading branch information
Showing
4 changed files
with
66 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/create-nx-workspace/src/utils/preset/get-third-party-preset.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { getPackageNameFromThirdPartyPreset } from './get-third-party-preset'; | ||
|
||
describe('getPackageNameFromThirdPartyPreset', () => { | ||
it('should return undefined if preset is invalid', () => { | ||
expect(getPackageNameFromThirdPartyPreset('_random')).toBeUndefined(); | ||
}); | ||
|
||
it('should return undefined if preset is known nx preset', () => { | ||
expect(getPackageNameFromThirdPartyPreset('react')).toBeUndefined(); | ||
expect(getPackageNameFromThirdPartyPreset('angular')).toBeUndefined(); | ||
}); | ||
|
||
it('should return package name if it is valid package', () => { | ||
expect(getPackageNameFromThirdPartyPreset('@nx-go/nx-go')).toEqual( | ||
'@nx-go/nx-go' | ||
); | ||
expect(getPackageNameFromThirdPartyPreset('@nx-go/[email protected]')).toEqual( | ||
'@nx-go/nx-go' | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters