Skip to content

Commit 798a584

Browse files
Add notrim attr
1 parent e003b39 commit 798a584

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/HTMLCodeBlockElement.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ describe('Props', () => {
2929
expect(cbElm.getAttribute('controls')).toBeNull();
3030
});
3131

32+
test('With notrim attributes', () => {
33+
const cbElm = new HTMLCodeBlockElement();
34+
35+
expect(cbElm.getAttribute('notrim')).toBeNull();
36+
cbElm.notrim = true;
37+
expect(cbElm.getAttribute('notrim')).toBe('');
38+
cbElm.notrim = false;
39+
expect(cbElm.getAttribute('notrim')).toBeNull();
40+
});
41+
3242
test('With label attributes', () => {
3343
const cbElm = new HTMLCodeBlockElement();
3444

@@ -82,8 +92,6 @@ describe('Render', () => {
8292
expect(cb.children[2].children[0].tagName.toLowerCase()).toBe('code');
8393
});
8494

85-
// ! JEST上でMutationObserver.disconnect()がうまく動作しないため
86-
// ! テストを省略する
8795
// TODO: Write tests of MutationObserver
8896

8997
// test('value', () => {

0 commit comments

Comments
 (0)