We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 165c809 commit 92a421aCopy full SHA for 92a421a
test/index.test.mjs
@@ -168,4 +168,10 @@ describe('htm', () => {
168
expect(html`<a>${''}9aaaaaaaaa${''}</a>`).not.toEqual(html`<a>${''}0${''}aaaaaaaaa${''}</a>`);
169
expect(html`<a>${''}0${''}aaaaaaaa${''}</a>`).not.toEqual(html`<a>${''}.8aaaaaaaa${''}</a>`);
170
});
171
+
172
+ test('do not mutate spread variables', () => {
173
+ const obj = {};
174
+ html`<a ...${obj} b="1" />`;
175
+ expect(obj).toEqual({});
176
+ });
177
0 commit comments