Skip to content

Commit 2c95b6f

Browse files
committed
Minor test re-organization
1 parent 1bd4f09 commit 2c95b6f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

js-tests/js-tests.jsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function xmlEqual(x1, x2) {
5858
&& x1.text === x2.text)
5959
return true;
6060
return x1.name === x2.name
61-
// Test attributes for equalitiy
61+
// Test attributes for equality
6262
&& Object.keys(x1).length === Object.keys(x2).length
6363
&& Object.keys(x1).every(k => x1[k] === x2[k])
6464
// Test children for equality
@@ -67,12 +67,7 @@ function xmlEqual(x1, x2) {
6767
}
6868

6969
describe('window.reactR', () => {
70-
describe('#hydrate()', () => {
71-
it('should throw an exception with an unknown component', () => {
72-
assert.throws(() => {
73-
reactR.hydrate({ Shout: Shout }, stringToTag('<Bar/>'))
74-
}, Error, /Unknown component/);
75-
});
70+
describe('#hydrate() with HTML', () => {
7671
it('hydrates an HTML5 component with a text child', () => {
7772
const markup = '<h1>Hello</h1>';
7873
assert.equal(
@@ -88,4 +83,11 @@ describe('window.reactR', () => {
8883
)
8984
})
9085
});
86+
describe('#hydrate() with Components', () => {
87+
it('should throw an exception with an unknown component', () => {
88+
assert.throws(() => {
89+
reactR.hydrate({ Shout: Shout }, stringToTag('<Bar/>'))
90+
}, Error, /Unknown component/);
91+
});
92+
})
9193
});

0 commit comments

Comments
 (0)