Skip to content

[Help wanted] Write proper unit test instead of verifying checksum with fromJS #17

@kopax

Description

@kopax

Update unit test for css mixins

We did validate our function using their checksum after validation for all historical unit test.

Reason: when we started @bootstrap-styled/v4, styled-components v1.0 was missing descent test utils and IDE integrations. This was often causing invalid css due to missing trailing comma in our code.

Checksum was a way to multiple check any code change throung test update requirement.

New test css utils for styled-components now exist such as:

This already appeared in package.json and is not used (yet), @santaclauze (wait for explanation):

    "stylelint": "^9.9.0",
    "stylelint-config-recommended": "^2.1.0",
    "stylelint-config-styled-components": "^0.1.1",
    "stylelint-processor-styled-components": "^1.5.1",

We must stop maintaining our tests using CSS checksum and check the css synthax with it.

This is not urgent but maintaining CSS the current way is a slow down factor for every modifications. It also doesn't make sens anymore.

Related Issues

Solution

Every time a change needs to be made on @bootstrap-styled/css-mixins, everytime a new test is added, this issue will collect explanation and test example from the test author. This will increase XP sharing for testing CSS across our team.

This ticket will be closed when no more checksum unit test will be existing in our source code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions