Skip to content

Commit 8385d6d

Browse files
authored
Merge pull request #31 from neogeek/hotfix/added-tests
[hotfix] Added tests.
2 parents a3e745b + 3e04cd5 commit 8385d6d

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/css.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,19 @@ describe('css string template utility', async () => {
3535
`
3636
);
3737
});
38+
test('simple css string with array', () => {
39+
const color = 'red';
40+
assert.equal(
41+
css`
42+
${['body']} {
43+
color: ${color};
44+
}
45+
`,
46+
`
47+
body {
48+
color: red;
49+
}
50+
`
51+
);
52+
});
3853
});

src/html.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ describe('html string template utility', async () => {
1919
'<span><b>this is a test</b></span>'
2020
);
2121
});
22+
test('simple html string with array', () => {
23+
const name = 'test';
24+
assert.equal(
25+
html`<span><b>this is a ${[name]}</b></span>`,
26+
'<span><b>this is a test</b></span>'
27+
);
28+
});
2229
test('map', () => {
2330
assert.equal(
2431
html`<ul>

0 commit comments

Comments
 (0)