@wix/zero-config-implementation 1.29.0 → 1.30.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.
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "registry": "https://registry.npmjs.org/",
5
5
  "access": "public"
6
6
  },
7
- "version": "1.29.0",
7
+ "version": "1.30.0",
8
8
  "description": "Core library for extracting component manifests from JS and CSS files",
9
9
  "type": "module",
10
10
  "main": "dist/index.js",
@@ -83,5 +83,5 @@
83
83
  ]
84
84
  }
85
85
  },
86
- "falconPackageHash": "9f12ded214e8668f280831d8bb3e03f08b14e2a9a46a97c8a423c29b"
86
+ "falconPackageHash": "7c40209d1126d0b860d10bc39a13660c52b5a97620afd671085c8c41"
87
87
  }
@@ -30,6 +30,15 @@ describe('formatDisplayName', () => {
30
30
  )
31
31
  })
32
32
 
33
+ it('drops leading words and result is less than 50 characters', () => {
34
+ // capitalCase('myComponentWithAVeryShortAndLongEnoughName')
35
+ // => "My Component With A Very Short And Long Enough Name" (51 chars)
36
+ // Drop "My" => "Component With A Very Short And Long Enough Name" (48 chars) < 50
37
+ const result = formatDisplayName('myComponentWithAVeryShortAndLongEnoughName')
38
+ expect(result).toBe('Component With A Very Short And Long Enough Name')
39
+ expect(result.length).toBe(48)
40
+ })
41
+
33
42
  it('truncates at 50 characters when a single word exceeds the limit', () => {
34
43
  // capitalCase of 51 repeated 'a' characters is a single word starting with uppercase
35
44
  const longSingleWord = 'a'.repeat(51)