Skip to content

chore: update asserts in workshop magazin steps 70-75 #61331

@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('.list-title, .list-subtitle'))

assert(new __helpers.CSSHelp(document).getStyle('.image-wrapper'));

assert(new __helpers.CSSHelp(document).getStyle('.image-1, .image-3'));


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('.list-title, .list-subtitle')?.color === 'rgb(0, 190, 239)');

assert(new __helpers.CSSHelp(document).getStyle('.image-wrapper')?.display === 'grid');

assert(new __helpers.CSSHelp(document).getStyle('.image-wrapper')?.gridTemplateColumns === '2fr 1fr');

assert(new __helpers.CSSHelp(document).getStyle('.image-wrapper')?.gridTemplateRows === 'repeat(3, min-content)');

assert(new __helpers.CSSHelp(document).getStyle('.image-wrapper')?.gap === '2rem');

assert(new __helpers.CSSHelp(document).getStyle('.image-wrapper')?.placeItems === 'center');

assert(new __helpers.CSSHelp(document).getStyle('.image-1, .image-3')?.gridColumn === '1 / -1');


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

    first timers onlyOpen for anyone doing contributions for first time. You do not need permission to work on these.full stack certThis label is for the new full stack certificationscope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions