jest-haste-map
Advanced tools
Comparing version 12.0.1 to 12.0.2
{ | ||
"name": "jest-haste-map", | ||
"version": "12.0.1", | ||
"version": "12.0.2", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -167,2 +167,16 @@ /** | ||
it('creates valid cache file paths', () => { | ||
jest.resetModuleRegistry(); | ||
HasteMap = require('../'); | ||
expect(HasteMap.getCacheFilePath('/', '@scoped/package', 'random-value')) | ||
.toMatch(/^\/-scoped-package-(.*)$/); | ||
expect( | ||
HasteMap.getCacheFilePath('/', '@scoped/package', 'random-value') | ||
).not.toEqual( | ||
HasteMap.getCacheFilePath('/', '-scoped-package', 'random-value') | ||
); | ||
}); | ||
pit('matches files against a pattern', () => { | ||
@@ -169,0 +183,0 @@ const hasteMap = new HasteMap(defaultConfig); |
@@ -148,4 +148,7 @@ /** | ||
const hash = crypto.createHash('md5'); | ||
Array.from(arguments).slice(2).forEach(arg => hash.update(arg)); | ||
return path.join(tmpdir, name + '-' + hash.digest('hex')); | ||
Array.from(arguments).slice(1).forEach(arg => hash.update(arg)); | ||
return path.join( | ||
tmpdir, | ||
name.replace(/\W/g, '-') + '-' + hash.digest('hex') | ||
); | ||
} | ||
@@ -152,0 +155,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100690
2915