✅(tokens) add a test token with a hyphen
tokens that includes hyphen are allowed but the feature wasn't been tested
This commit is contained in:
@@ -24,7 +24,7 @@ describe("JsGenerator", () => {
|
||||
await run(["", "", "-g", "js"]);
|
||||
expect(fs.existsSync(tokensFile)).toEqual(true);
|
||||
expect(fs.readFileSync(tokensFile).toString()).toMatchInlineSnapshot(`
|
||||
"export const tokens = {"theme":{"colors":{"primary":"#055FD2","secondary":"#DA0000"},"font":{"sizes":{"m":"1rem"},"weights":{"medium":400},"families":{"base":"Roboto"}},"spacings":{"s":"1rem"},"transitions":{"ease":"linear"}}};
|
||||
"export const tokens = {"theme":{"colors":{"primary":"#055FD2","secondary":"#DA0000","ternary-900":"#022858"},"font":{"sizes":{"m":"1rem"},"weights":{"medium":400},"families":{"base":"Roboto"}},"spacings":{"s":"1rem"},"transitions":{"ease":"linear"}}};
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
@@ -27,7 +27,10 @@ describe("SassGenerator", () => {
|
||||
expect(fs.readFileSync(sassFile).toString()).toMatchInlineSnapshot(`
|
||||
"$colors: (
|
||||
primary: #055FD2,
|
||||
secondary: #DA0000
|
||||
secondary: #DA0000,
|
||||
ternary: (
|
||||
900: #022858
|
||||
)
|
||||
);
|
||||
$fontFamilies: (
|
||||
base: Roboto
|
||||
|
||||
@@ -24,7 +24,7 @@ describe("TsGenerator", () => {
|
||||
await run(["", "", "-g", "ts"]);
|
||||
expect(fs.existsSync(tokensFile)).toEqual(true);
|
||||
expect(fs.readFileSync(tokensFile).toString()).toMatchInlineSnapshot(`
|
||||
"export const tokens = {"theme":{"colors":{"primary":"#055FD2","secondary":"#DA0000"},"font":{"sizes":{"m":"1rem"},"weights":{"medium":400},"families":{"base":"Roboto"}},"spacings":{"s":"1rem"},"transitions":{"ease":"linear"}}};
|
||||
"export const tokens = {"theme":{"colors":{"primary":"#055FD2","secondary":"#DA0000","ternary-900":"#022858"},"font":{"sizes":{"m":"1rem"},"weights":{"medium":400},"families":{"base":"Roboto"}},"spacings":{"s":"1rem"},"transitions":{"ease":"linear"}}};
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
@@ -3,6 +3,7 @@ module.exports = {
|
||||
colors: {
|
||||
primary: "#055FD2",
|
||||
secondary: "#DA0000",
|
||||
"ternary-900": "#022858",
|
||||
},
|
||||
font: {
|
||||
sizes: {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
:root {
|
||||
--c--theme--colors--primary: #055FD2;
|
||||
--c--theme--colors--secondary: #DA0000;
|
||||
--c--theme--colors--ternary-900: #022858;
|
||||
--c--theme--font--sizes--m: 1rem;
|
||||
--c--theme--font--weights--medium: 400;
|
||||
--c--theme--font--families--base: Roboto;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
:root {
|
||||
--c--theme--colors--primary: AntiqueWhite;
|
||||
--c--theme--colors--secondary: #DA0000;
|
||||
--c--theme--colors--ternary-900: #022858;
|
||||
--c--theme--font--sizes--m: 1rem;
|
||||
--c--theme--font--weights--medium: 400;
|
||||
--c--theme--font--families--base: Roboto;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
:root {
|
||||
--c--theme--colors--primary: #055FD2;
|
||||
--c--theme--colors--secondary: #DA0000;
|
||||
--c--theme--colors--ternary-900: #022858;
|
||||
--c--theme--font--sizes--m: 1rem;
|
||||
--c--theme--font--weights--medium: 400;
|
||||
--c--theme--font--families--base: Roboto;
|
||||
@@ -8,8 +9,10 @@
|
||||
--c--theme--transitions--ease: linear;
|
||||
} .clr-primary { color: var(--c--theme--colors--primary); }
|
||||
.clr-secondary { color: var(--c--theme--colors--secondary); }
|
||||
.clr-ternary-900 { color: var(--c--theme--colors--ternary-900); }
|
||||
.bg-primary { background-color: var(--c--theme--colors--primary); }
|
||||
.bg-secondary { background-color: var(--c--theme--colors--secondary); }
|
||||
.bg-ternary-900 { background-color: var(--c--theme--colors--ternary-900); }
|
||||
.fw-medium { font-weight: var(--c--theme--font--weights--medium); }
|
||||
.fs-m { font-size: var(--c--theme--font--sizes--m); }
|
||||
.f-base { font-family: var(--c--theme--font--families--base); }
|
||||
|
||||
Reference in New Issue
Block a user