Skip to content

Commit

Permalink
test: add a failing test for #964
Browse files Browse the repository at this point in the history
  • Loading branch information
tivac committed Aug 7, 2023
1 parent 880b5a2 commit 144106e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/processor/test/__snapshots__/values.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ exports[`/processor.js values should support importing variables from a file 1`]
"
`;

exports[`/processor.js values should support layers of namespaced value references 1`] = `
"/* packages/processor/test/specimens/deep-namespace/c.css */
/* packages/processor/test/specimens/deep-namespace/b.css */
/* packages/processor/test/specimens/deep-namespace/a.css */
.mc_a {
color: cyan;
}"
`;

exports[`/processor.js values should support local values in value composition 1`] = `
"/* packages/processor/test/specimens/folder/folder.css */
.mc_folder { margin: 2px; }
Expand Down
5 changes: 5 additions & 0 deletions packages/processor/test/specimens/deep-namespace/a.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@value b from "./b.css";

.a {
color: b;
}
3 changes: 3 additions & 0 deletions packages/processor/test/specimens/deep-namespace/b.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@value * as values from "./c.css";

@value b: values.c;
1 change: 1 addition & 0 deletions packages/processor/test/specimens/deep-namespace/c.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@value c: cyan;
8 changes: 8 additions & 0 deletions packages/processor/test/values.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,5 +195,13 @@ describe("/processor.js", () => {

expect(css).toMatchSnapshot();
});

it.only("should support layers of namespaced value references", async () => {

Check failure on line 199 in packages/processor/test/values.test.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected focused test
await processor.file(require.resolve("./specimens/deep-namespace/a.css"));

const { css } = await processor.output();

expect(css).toMatchSnapshot();
});
});
});

0 comments on commit 144106e

Please sign in to comment.