Skip to content

chore: update asserts in workshop magazine steps 64-69 #61330

Closed
@ilenia-magoni

Description

@ilenia-magoni

This issue is about updating some of the tests in the curriculum to use specific assert methods. The documentation on the methods can be found here: https://www.chaijs.com/api/assert/

Each group of asserts to replace has indicated which is the suggested assert method to use, make sure to not change what is being tested. For any questions, you can reach out in our chat room or our forum.

If some of the lines changed do not end with a semicolon, let's take this occasion to add it.


These should be assert.exists, the argument stays the same

assert(new __helpers.CSSHelp(document).getStyle('.text-with-images'));



The following assert() should be replaced with assert.equal() removing the ===

assert.equal takes two arguments, which will be the two operands of the comparison operator

ex. from assert(a === b) to assert.equal(a, b)

assert(new __helpers.CSSHelp(document).getStyle('.text-with-images')?.display === 'grid');

assert(new __helpers.CSSHelp(document).getStyle('.text-with-images')?.gridTemplateColumns === '1fr 2fr');

assert(new __helpers.CSSHelp(document).getStyle('.text-with-images')?.columnGap === '3rem');

assert(new __helpers.CSSHelp(document).getStyle('.text-with-images')?.marginBottom === '3rem');

assert(new __helpers.CSSHelp(document).getStyle('.lists')?.listStyleType === 'none');

assert(new __helpers.CSSHelp(document).getStyle('.lists')?.marginTop === '2rem');

assert(new __helpers.CSSHelp(document).getStyle('.lists li')?.marginBottom === '1.5rem');


This looks like something that can be fixed by "first-time" code contributors to this repository.

Please make sure you read our guidelines for contributing, we prioritize contributors following the instructions in our guides. Join us in our chat room or our forum if you need help contributing; our moderators will guide you through this.

Sometimes we may get more than one pull request. We typically accept the most quality contribution followed by the one that is made first.

Happy contributing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    full stack certThis label is for the new full stack certificationscope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.status: PR in worksWork in Progress (WIP) Issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions