@openmrs/esm-navigation
Advanced tools
Comparing version 5.8.2-pre.2534 to 6.0.0
{ | ||
"name": "@openmrs/esm-navigation", | ||
"version": "5.8.2-pre.2534", | ||
"version": "6.0.0", | ||
"license": "MPL-2.0", | ||
@@ -47,6 +47,5 @@ "description": "OpenMRS library providing tools for breadcrumbs, navigation, and history.", | ||
"devDependencies": { | ||
"@openmrs/esm-state": "5.8.2-pre.2534", | ||
"@openmrs/esm-state": "6.0.0", | ||
"lodash": "^4.17.21" | ||
}, | ||
"stableVersion": "5.8.1" | ||
} | ||
} |
@@ -35,2 +35,27 @@ import { interpolateString, interpolateUrl } from './interpolate-string'; | ||
}); | ||
it('handles multiple occurrences of the same parameter', () => { | ||
const result = interpolateString('${value} and ${value}', { value: 'test' }); | ||
expect(result).toBe('test and test'); | ||
}); | ||
it('handles empty string parameters', () => { | ||
const result = interpolateString('prefix${param}suffix', { param: '' }); | ||
expect(result).toBe('prefixsuffix'); | ||
}); | ||
it('leaves unreplaced parameters in template string', () => { | ||
const result = interpolateString('${exists} ${missing}', { exists: 'value' }); | ||
expect(result).toBe('value ${missing}'); | ||
}); | ||
it('removes double slashes at the start of URLs', () => { | ||
const result = interpolateUrl('${openmrsBase}/${path}', { path: 'test' }); | ||
expect(result).toBe('/openmrs/test'); | ||
}); | ||
it('handles special characters in parameters', () => { | ||
const result = interpolateString('${param}', { param: '${}' }); | ||
expect(result).toBe('${}'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
133899
682
0