Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { render, screen } from "@testing-library/react-native";
import { compile } from "react-native-css/compiler";
import { View } from "react-native-css/components";
import { registerCSS, testID } from "react-native-css/jest";

import { compile } from "../compiler";

test("@prop target (nested @media)", () => {
const compiled = registerCSS(`
.my-class {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { compile } from "../compiler";
import { compile } from "react-native-css/compiler";

test("hello world", () => {
const compiled = compile(`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { compile } from "../compiler";
import { compile } from "react-native-css/compiler";

describe.skip("platform media queries", () => {
test("android", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getClassNameSelectors } from "../selector-builder";
import { getClassNameSelectors } from "../../compiler/selector-builder";

test("empty", () => {
expect(getClassNameSelectors([])).toStrictEqual([]);
Expand Down
70 changes: 70 additions & 0 deletions src/__tests__/compiler/unstable_animations.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { compile } from "react-native-css/compiler";

test("test compiler", () => {
const compiled = compile(
`
.test {
animation: slide-in 1s;
}

@keyframes slide-in {
from {
margin-left: 100%;
}

to {
margin-left: 0%;
}
}
`,
);

expect(compiled.stylesheet()).toStrictEqual({
k: [
[
"slide-in",
[
[
"from",
[
{
marginLeft: "100%",
},
],
],
[
"to",
[
{
marginLeft: "0%",
},
],
],
],
],
],
s: [
[
"test",
[
{
a: true,
d: [
[[[{}, "animationName", ["slide-in"], 1]], "animationName"],
{
animationDelay: [0],
animationDirection: ["normal"],
animationDuration: [1000],
animationFillMode: ["none"],
animationIterationCount: [1],
animationPlayState: ["running"],
animationTimingFunction: "ease",
},
],
s: [1, 1],
},
],
],
],
});
});
57 changes: 0 additions & 57 deletions src/compiler/__tests__/unstable_animations.test.ts

This file was deleted.

Loading