@openmrs/esm-navigation 5.8.2-pre.2533 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,4 +4,4 @@ runtime modules 670 bytes 3 modules
4
4
  built modules 46.7 KiB [built]
5
5
  ./src/index.ts + 7 modules 46.6 KiB [built] [code generated]
6
6
  external "@openmrs/esm-state" 42 bytes [built] [code generated]
7
- webpack 5.88.0 compiled successfully in 9629 ms
7
+ webpack 5.88.0 compiled successfully in 9792 ms
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-navigation",
3
- "version": "5.8.2-pre.2533",
3
+ "version": "6.0.0",
4
4
  "license": "MPL-2.0",
5
5
  "description": "OpenMRS library providing tools for breadcrumbs, navigation, and history.",
6
6
  "browser": "dist/openmrs-esm-navigation.js",
@@ -44,8 +44,7 @@
44
44
  "@openmrs/esm-state": "5.x"
45
45
  },
46
46
  "devDependencies": {
47
- "@openmrs/esm-state": "5.8.2-pre.2533",
47
+ "@openmrs/esm-state": "6.0.0",
48
48
  "lodash": "^4.17.21"
49
- },
50
- "stableVersion": "5.8.1"
49
+ }
51
50
  }
@@ -32,4 +32,29 @@ describe('interpolateString', () => {
32
32
  const result = interpolateString('test ok', { one: '1', two: '2' });
33
33
  expect(result).toBe('test ok');
34
34
  });
35
+
36
+ it('handles multiple occurrences of the same parameter', () => {
37
+ const result = interpolateString('${value} and ${value}', { value: 'test' });
38
+ expect(result).toBe('test and test');
39
+ });
40
+
41
+ it('handles empty string parameters', () => {
42
+ const result = interpolateString('prefix${param}suffix', { param: '' });
43
+ expect(result).toBe('prefixsuffix');
44
+ });
45
+
46
+ it('leaves unreplaced parameters in template string', () => {
47
+ const result = interpolateString('${exists} ${missing}', { exists: 'value' });
48
+ expect(result).toBe('value ${missing}');
49
+ });
50
+
51
+ it('removes double slashes at the start of URLs', () => {
52
+ const result = interpolateUrl('${openmrsBase}/${path}', { path: 'test' });
53
+ expect(result).toBe('/openmrs/test');
54
+ });
55
+
56
+ it('handles special characters in parameters', () => {
57
+ const result = interpolateString('${param}', { param: '${}' });
58
+ expect(result).toBe('${}');
59
+ });
35
60
  });