@justeat/fozzie
Advanced tools
Comparing version 10.5.0 to 10.6.0
@@ -5,3 +5,3 @@ { | ||
"description": "UI Web Framework for the Just Eat Global Platform", | ||
"version": "10.5.0", | ||
"version": "10.6.0", | ||
"main": "dist/js/index.js", | ||
@@ -8,0 +8,0 @@ "files": [ |
@@ -70,1 +70,17 @@ <div align="center"> | ||
``` | ||
## Testing | ||
We currently test our SCSS in two ways: | ||
1. Unit testing | ||
2. Snapshot testing | ||
### Unit Testing | ||
We use a library called `sass-true` to enable writing unit tests for sass functions and mixins. These tests live in `src/test/scss/unit-tests`. We should use these as a means of documentation for our functions and mixins, as well as ensuring that API regressions aren't introduced. | ||
### Snapshot Testing | ||
We use `Jest` to write snapshot tests of the compiled CSS for parts of Fozzie. These live in `src/test/scss/snapshot-tests`. Snapshot tests provide a means of ensuring that no unexpected styles will be introduced for consumers of the library. They can also be used to ensure that the compiled CSS is 100% valid, or to make sure there's simply nothing unexpected being rendered. | ||
To write these tests, we can either import an SCSS file or write a line of SCSS we'd like to test and compile it using the `compileToCss.js` module. We can then use Jest to snapshot test the outputted string. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
288142
67
86