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

Fix .add() 无法覆盖同名模板的问题,并增加相应单元测试 #20

Merged
merged 1 commit into from
Nov 2, 2015
Merged

Conversation

Fishfaceeast
Copy link
Collaborator

No description provided.

@cssmagic cssmagic changed the title fix.add()无法覆盖同名模板并增加相应单测 Fix .add() 无法覆盖同名模板的问题,并增加相应单元测试 Oct 21, 2015
template.add(TEMPLATE_ID_2, templateCode2)
data[TEMPLATE_ID_2] = templateCode2
template.add(TEMPLATE_ID_1, templateCode2)
data[TEMPLATE_ID_1] = templateCode2
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原来的测试代码写错了?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得写错了,我认为应该这么测试:add一次id为TEMPLATE_ID_1的模板templateCode1,然后再add一次同名的模板templateCode2, data是正确的,然后比较_cacheTemplate和data是否一致。

cssmagic added a commit that referenced this pull request Nov 2, 2015
Fix `.add()` 无法覆盖同名模板的问题,并增加相应单元测试
@cssmagic cssmagic merged commit f711a3e into cssmagic:master Nov 2, 2015
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

Successfully merging this pull request may close these issues.

2 participants