configs/arch-config/.mozilla/firefox/default-release/chrome/__tests__/os.test.scss
2022-05-11 21:19:02 +02:00

148 lines
3.6 KiB
SCSS

@use 'true' as *;
@use "example" as *;
@use "../src/utils/os" as *;
// TODO: Need more tests..
@include test-module("Create OS related media [mix]") {
@include test("win7") {
@include assert {
@include output {
@include OS($win7) {
@include example;
}
}
@include expect {
@media (-moz-os-version: windows-win7), (-moz-platform: windows-win7) {
@include example;
}
}
}
}
@include test("win8") {
@include assert {
@include output {
@include OS($win8) {
@include example;
}
}
@include expect {
@media (-moz-os-version: windows-win8), (-moz-platform: windows-win8) {
@include example;
}
}
}
}
@include test("win10") {
@include assert {
@include output {
@include OS($win10) {
@include example;
}
}
@include expect {
@media (-moz-os-version: windows-win10), (-moz-platform: windows-win10) {
@include example;
}
}
}
}
@include test("linux") {
@include assert {
@include output {
@include OS($linux) {
@include example;
}
}
@include expect {
@media (-moz-gtk-csd-available) {
@include example;
}
}
}
}
@include test("mac") {
@include assert {
@include output {
@include OS($mac) {
@include example;
}
}
@include expect {
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") {
@include example;
}
}
}
}
@include test("bigsur") {
@include assert {
@include output {
@include OS($bigsur) {
@include example;
}
}
@include expect {
@media (-moz-mac-big-sur-theme: 0) {
@include example;
}
}
}
}
@include test("win") {
@include assert {
@include output {
@include OS($win) {
@include example;
}
}
@include expect {
@media (-moz-os-version: windows-win7), (-moz-platform: windows-win7), (-moz-os-version: windows-win8), (-moz-platform: windows-win8), (-moz-os-version: windows-win10), (-moz-platform: windows-win10) {
@include example;
}
}
}
}
@include test("all os - win7, win8, win10, mac, bigsur, linux") {
@include assert {
@include output {
@include OS($win7, $win8, $win10, $mac, $bigsur, $linux) {
@include example;
}
}
@include expect {
@media (-moz-os-version: windows-win7), (-moz-platform: windows-win7), (-moz-os-version: windows-win8), (-moz-platform: windows-win8), (-moz-os-version: windows-win10), (-moz-platform: windows-win10), (-moz-mac-big-sur-theme: 0), (-moz-gtk-csd-available) {
@include example;
}
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") {
@include example;
}
}
}
}
@include test("all os - win, mac, bigsur, linux") {
@include assert {
@include output {
@include OS($win, $mac, $bigsur, $linux) {
@include example;
}
}
@include expect {
@media (-moz-mac-big-sur-theme: 0), (-moz-gtk-csd-available), (-moz-os-version: windows-win7), (-moz-platform: windows-win7), (-moz-os-version: windows-win8), (-moz-platform: windows-win8), (-moz-os-version: windows-win10), (-moz-platform: windows-win10) {
@include example;
}
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") {
@include example;
}
}
}
}
}