Open
Conversation
huluoyang
suggested changes
Aug 8, 2018
| # 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,你可以以程序需求为基础的编写测试代码,看程序是否能通过测试。 |
Contributor
There was a problem hiding this comment.
随着你的程序越来越复杂,你经常需要测试新增代码是否会破坏原先的功能。Chai 是一个 JavaScript 测试库,它可以帮助你检查程序在更新后是否如你所期望的运行。通过Chai,你可以用测试驱动开发的方式来编写代码。
| 随着你的程序越来越复杂,你经常需要测试新增代码是否会破坏原先的功能。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(你的应用的主页)复制到挑战页面,然后点击测试!另外你也可以选择在其他平台书写测试代码,但必须是公开可见的,这样我们才能测试你的代码。 |
Contributor
There was a problem hiding this comment.
你的应用的主页 => 应用的主页
一句话2个的,你懂的。
S1ngS1ng
suggested changes
Aug 8, 2018
| "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。", |
Contributor
There was a problem hiding this comment.
| { | ||
| "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", |
Contributor
There was a problem hiding this comment.
| ".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()", |
Contributor
| "tests": [ | ||
| { | ||
| "text": "All tests should pass", | ||
| "text": "需通过全部测试", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.