Quest Academy

Quality Assurance and Testing with Chai

Introduction to the Basic Node and Express Challenges

Node.js เป็นเครื่องมือ JavaScript ที่ช่วยนักพัฒนาสามารถเขียนโปรแกรม blackend (ฝั่งเซิร์ฟเวอร์) ใน JavaScript Node.js มาพร้อมกับโมดูลในตัวจำนวนหนึ่งซึ่งเป็นโปรแกรมอิสระขนาดเล็กที่ช่วยอำนวยความสะดวกในจุดประสงค์นี้ โมดูลหลักบางส่วนประกอบด้วย:

  • HTTP: โมดูลที่ทำหน้าที่เป็นเซิร์ฟเวอร์
  • File System: โมดูลที่อ่านและแก้ไขไฟล์
  • Path: โมดูลสำหรับการทำงานกับไดเร็กทอรีและ paths ไฟล์
  • Assertion Testing: โมดูลที่ตรวจสอบโค้ดกับข้อ จำกัด ที่กำหนด

Express แม้ว่าจะไม่รวมอยู่ใน Node.js แต่ก็เป็นอีกโมดูลหนึ่งที่มักใช้กับมัน Express ทำงานระหว่างเซิร์ฟเวอร์ที่สร้างโดย Node.js และหน้าส่วนหน้าของเว็บแอ็พพลิเคชัน Express ยังจัดการการกำหนดเส้นทางของ การกำหนดเส้นทางนำผู้ใช้ไปยังหน้าที่ถูกต้องตาม

แม้ว่าจะมีทางเลือกอื่นในการใช้ Express แต่ความเรียบง่ายทำให้เป็นจุดเริ่มต้นที่ดีเมื่อเรียนรู้การโต้ตอบระหว่างแบ็กเอนด์ที่ขับเคลื่อนโดย Node.js และส่วนหน้าpage การทำงานกับความท้าทายเหล่านี้จะเกี่ยวข้องกับการเขียนโค้ดของคุณบน Glitch ในโครงการเริ่มต้นของเรา หลังจากเสร็จสิ้นการท้าทายแต่ละครั้งคุณสามารถคัดลอก URL Glitch สาธารณะของคุณ (ไปยังหน้าแรกของแอปของคุณ) ลงในหน้าจอท้าทายเพื่อทดสอบได้! คุณสามารถเลือกที่จะเขียนโครงการของคุณบนแพลตฟอร์มอื่นได้ แต่ต้องเปิดเผยต่อสาธารณะสำหรับการทดสอบของเรา
เริ่มโครงการนี้ในทันทีทันใดโดยใช้ this link หรือโคลน this repository บน GitHub! หากคุณใช้ Glitch อย่าลืมบันทึกลิงก์ไปยังโครงการของคุณในที่ที่ปลอดภัย!

Quality Assurance and Testing with Chai

Learn How JavaScript Assertions Work

Test if a Variable or Function is Defined

Use Assert.isOK and Assert.isNotOK

Test for Truthiness

Use the Double Equals to Assert Equality

Use the Triple Equals to Assert Strict Equality

Assert Deep Equality with .deepEqual and .notDeepEqual

Compare the Properties of Two Elements

Test if One Value is Below or At Least as Large as Another

Test if a Value Falls within a Specific Range

Test if a Value is an Array

Test if an Array Contains an Item

Test if a Value is a String

Test if a String Contains a Substring

Use Regular Expressions to Test a String

Test if an Object has a Property

Test if a Value is of a Specific Data Structure Type

Test if an Object is an Instance of a Constructor

Run Functional Tests on API Endpoints using Chai-HTTP

Run Functional Tests on API Endpoints using Chai-HTTP II

Run Functional Tests on an API Response using Chai-HTTP III - PUT method

Run Functional Tests on an API Response using Chai-HTTP IV - PUT method

Run Functional Tests using a Headless Browser

Run Functional Tests using a Headless Browser II

Be the first to add a review.

Please, login to leave a review
Add to Wishlist

Archive

Quality Assurance and Testing with Chai
Price:
Free