Skip to content

Commit d3b2f1c

Browse files
authored
Update HammingCode.test.js
1 parent 039a572 commit d3b2f1c

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
import { HammingCode } from '../HammingCode'
22

33
test('checks HammingCode of 1110101 hex converted is 5', () => {
4-
const code = HammingCode(parseInt("1110101",16));
5-
expect(code).toBe(5);
6-
});
4+
const code = HammingCode(parseInt("1110101",16))
5+
expect(code).toBe(5)
6+
})
77

88
test('checks HammingCode of 10043091 hex converted is 7', () => {
9-
const code = HammingCode(parseInt("10043091",16));
10-
expect(code).toBe(7);
11-
});
9+
const code = HammingCode(parseInt("10043091",16))
10+
expect(code).toBe(7)
11+
})
1212

1313
test('checks HammingCode of 889193 hex converted is 9', () => {
14-
const code = HammingCode(parseInt("889193",16));
15-
expect(code).toBe(9);
16-
});
14+
const code = HammingCode(parseInt("889193",16))
15+
expect(code).toBe(9)
16+
})
1717

1818
test('checks HammingCode of 1110101 hex converted is 5', () => {
19-
const code = HammingCode(parseInt("1101110",2));
20-
expect(code).toBe(5);
21-
});
19+
const code = HammingCode(parseInt("1101110",2))
20+
expect(code).toBe(5)
21+
})
2222

2323
test('checks HammingCode of 1101110 is 5', () => {
24-
const code = HammingCode(1101110);
25-
expect(code).toBe(5);
26-
});
24+
const code = HammingCode(1101110)
25+
expect(code).toBe(5)
26+
})
2727

2828
test('checks HammingCode of 0x10043091 is 7', () => {
29-
const code = HammingCode(0x10043091);
30-
expect(code).toBe(7);
31-
});
29+
const code = HammingCode(0x10043091)
30+
expect(code).toBe(7)
31+
})
3232

3333
test('checks HammingCode of 0x8891930311 is NaN (above range)', () => {
34-
const code = HammingCode(0x8891930311);
35-
expect(code).toBeNaN();
36-
});
34+
const code = HammingCode(0x8891930311)
35+
expect(code).toBeNaN()
36+
})
3737

3838
test('checks HammingCode of the Number 100 is 3', () => {
39-
const code = HammingCode((Number(100));
40-
expect(code).toBe(3);
41-
});
39+
const code = HammingCode((Number(100))
40+
expect(code).toBe(3)
41+
})

0 commit comments

Comments
 (0)