-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
strip package scope in safePackageName function
- Loading branch information
Hyan Mandian
committed
Jun 17, 2019
1 parent
2fb7e05
commit 7b48d39
Showing
5 changed files
with
520 additions
and
909 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
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"roots": ["<rootDir>/tests"], | ||
"collectCoverageFrom": ["**/*.js"], | ||
"testMatch": [ | ||
"<rootDir>/tests/**/?(*.)(spec|test).(ts|js)?(x)" | ||
] | ||
} | ||
"transform": { | ||
"^.+\\.ts?$": "ts-jest" | ||
}, | ||
"testMatch": ["<rootDir>/tests/**/?(*.)(spec|test).(ts|js)?(x)"] | ||
} |
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,9 @@ | ||
const { safePackageName } = require('../../src/utils'); | ||
|
||
describe('utils | safePackageName', () => { | ||
it('should generate safe package name', () => { | ||
expect(safePackageName('@babel/core')).toBe('core'); | ||
expect(safePackageName('react')).toBe('react'); | ||
expect(safePackageName('react-dom')).toBe('react-dom'); | ||
}); | ||
}); |
Oops, something went wrong.