-
Notifications
You must be signed in to change notification settings - Fork 32
更新 chai.json chai.md #75
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
base: translate
Are you sure you want to change the base?
Conversation
@@ -1,7 +1,7 @@ | |||
# Introduction to Quality Assurance with Chai Challenges # | |||
|
|||
As your programs become more complex, you need to test them often to make sure any new code you add doesn't break the program's original functionality. Chai is a JavaScript testing library that helps you check that your program still behaves the way you expect it to after you make changes. Using Chai, you can write tests that describe your program's requirements and see if your program meets them. | |||
随着你的程序越来越复杂,你经常需要测试新增代码是否会破坏原先的功能。Chai 是一个 JavaScript 测试库,它可以帮助你检查程序在更新后是否以你的期望运行。使用 Chai,你可以以程序需求为基础的编写测试代码,看程序是否能通过测试。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
随着你的程序越来越复杂,你经常需要测试新增代码是否会破坏原先的功能。Chai 是一个 JavaScript 测试库,它可以帮助你检查程序在更新后是否如你所期望的运行。通过Chai,你可以用测试驱动开发的方式来编写代码。
|
||
Working on these challenges will involve you writing your code on Glitch on our starter project. After completing each challenge you can copy your public glitch url (to the homepage of your app) into the challenge screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing. | ||
这个挑战需要你在 Glitch 上给出的代码的基础上进行。在完成每项挑战后,把你的公共 glitch url(你的应用的主页)复制到挑战页面,然后点击测试!另外你也可以选择在其他平台书写测试代码,但必须是公开可见的,这样我们才能测试你的代码。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你的应用的主页 => 应用的主页
一句话2个的,你懂的。
@@ -8,21 +8,21 @@ | |||
"id": "587d824a367417b2b2512c46", | |||
"title": "Learn How JavaScript Assertions Work", | |||
"description": [ | |||
"As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.", | |||
"Use assert.isNull() or assert.isNotNull() to make the tests pass." | |||
"再次提醒,本项目基于初始项目 <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>,或从 <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a> clone。", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=0').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })" | ||
}, | ||
{ | ||
"text": "Choose the right assertion - isNull vs. isNotNull", | ||
"testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=0').then(data => { assert.equal(data.assertions[0].method, 'isNull', 'Null is null'); }, xhr => { throw new Error(xhr.responseText); })" | ||
"text": "请选择正确的断言 - isNull vs. isNotNull", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
".equal(), .notEqual()", | ||
".equal() compares objects using '=='" | ||
"再次提醒,本项目基于初始项目 <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>,或从 <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a> clone。", | ||
".equal(),.notEqual()", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那么统一“和”还是“或”呢?
], | ||
"tests": [ | ||
{ | ||
"text": "All tests should pass", | ||
"text": "需通过全部测试", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这之后的 testString
你好像都没有翻译
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好像没什么需要翻译的地方……
No description provided.