Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mocha 测试 --check-leaks不通过 #124

Closed
bingyiyu1 opened this issue Mar 13, 2017 · 1 comment
Closed

mocha 测试 --check-leaks不通过 #124

bingyiyu1 opened this issue Mar 13, 2017 · 1 comment

Comments

@bingyiyu1
Copy link

bingyiyu1 commented Mar 13, 2017

这是mocha的test测试的设置

    "test": "mocha  --harmony_proxies  --reporter spec --check-leaks --globals  csvFile,l  test/*/*.test.js",

npm test 运行后第一次执行pinyin(name,{style :pinyin.STYLE_NORMAL,heteronym: true,segment: true }):
会报错 Error: global leaks detected: dict, hmmDict, userDict, idfDict, stopWordDict;
是heteronym: true引起的= =||;感觉是mocha的坑.如果能帮忙优化是极好的.
还有前两天的厦门多音字帮忙解决了谢谢@_@.这里还找到两个错的
name = modifyPinyin('LvXingShe','旅行社',name,isFull); 会变成lvhangshe
name = modifyPinyin('XinYongKa','信用卡',name,isFull);会变成xinyongqia

发现后我手动写方法修改了.机智如我~

维护这个库大佬辛苦了向大佬致敬~给大佬递茶

@hotoo
Copy link
Owner

hotoo commented Mar 22, 2022

请使用 3.x npm i pinyin@alpha

@hotoo hotoo closed this as completed Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants