File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- const { wcswidth, wcwidth } = require ( 'simple-wcswidth ' ) ;
1+ const { wcswidth, wcwidth } = require ( '../../dist/index.js ' ) ;
22const assert = require ( 'assert' ) ;
33
44function runAllTests ( ) {
@@ -16,9 +16,9 @@ function runAllTests() {
1616
1717 // Test 3: Mixed Content
1818 console . log ( 'Running mixed content tests...' ) ;
19- assert . strictEqual ( wcswidth ( 'Hello 世界' ) , 9 , 'Mixed ASCII and CJK should have correct width' ) ;
20- assert . strictEqual ( wcswidth ( '123 你好' ) , 7 , 'Mixed numbers and CJK should have correct width' ) ;
21- assert . strictEqual ( wcswidth ( '!@# こんにちは' ) , 13 , 'Mixed special chars and CJK should have correct width' ) ;
19+ assert . strictEqual ( wcswidth ( 'Hello 世界' ) , 10 , 'Mixed ASCII and CJK should have correct width' ) ;
20+ assert . strictEqual ( wcswidth ( '123 你好' ) , 8 , 'Mixed numbers and CJK should have correct width' ) ;
21+ assert . strictEqual ( wcswidth ( '!@# こんにちは' ) , 14 , 'Mixed special chars and CJK should have correct width' ) ;
2222
2323 // Test 4: Control Characters
2424 console . log ( 'Running control character tests...' ) ;
You can’t perform that action at this time.
0 commit comments