Skip to content

Commit

Permalink
Update BinaryToText.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
User-DK authored Oct 3, 2023
1 parent 8ffdb53 commit 0eb18b6
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Conversions/test/BinaryToText.test.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
import { binaryAgent } from '../BinaryToText';
import { binaryToText } from '../BinaryToText.js';

describe('binaryAgent', () => {
describe('binaryToText', () => {
it('should convert binary to text', () => {
const binaryInput = '01001000 01100101 01101100 01101100 01101111';
const expectedOutput = 'Hello';

const result = binaryAgent(binaryInput);
const result = binaryToText(binaryInput);

expect(result).toEqual(expectedOutput);
});

it('should handle other test cases', () => {
const binaryInput = "01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111";
const expectedOutput = "Aren't bonfires fun!?";

const result = binaryAgent(binaryInput);

expect(result).toEqual(expectedOutput);

});
});

0 comments on commit 0eb18b6

Please sign in to comment.