Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
A lot of the assertions you'll write in your tests have to do with values. You'll want to assert that something is bigger than 5 or has less than 3 items. Let's look at the assertions provided for comparing against numbers.
New Terms
setUp() - Method that is run before each test. Use this to set up state for the tests
assertEqual(x, y) - Make sure x
and y
are equal
assertNotEqual(x, y) - Make sure x
and y
are not equal
assertGreater(x, y) - Make sure x
is greater than y
assertLess(x, y) - Make sure x
is less than y
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up