2021-04-29 03:32:12 -07:00
|
|
|
const caesar = require('./caesar.js')
|
2017-08-25 11:59:26 -07:00
|
|
|
|
2021-03-09 03:12:25 -08:00
|
|
|
test('works with single letters', () => {
|
|
|
|
expect(caesar('A', 1)).toBe('B');
|
|
|
|
});
|
|
|
|
test.skip('works with words', () => {
|
|
|
|
expect(caesar('Aaa', 1)).toBe('Bbb');
|
|
|
|
});
|
|
|
|
test.skip('works with phrases', () => {
|
|
|
|
expect(caesar('Hello, World!', 5)).toBe('Mjqqt, Btwqi!');
|
|
|
|
});
|
|
|
|
test.skip('works with negative shift', () => {
|
|
|
|
expect(caesar('Mjqqt, Btwqi!', -5)).toBe('Hello, World!');
|
|
|
|
});
|
|
|
|
test.skip('wraps', () => {
|
|
|
|
expect(caesar('Z', 1)).toBe('A');
|
|
|
|
});
|
|
|
|
test.skip('works with large shift factors', () => {
|
|
|
|
expect(caesar('Hello, World!', 75)).toBe('Ebiil, Tloia!');
|
|
|
|
});
|
|
|
|
test.skip('works with large negative shift factors', () => {
|
|
|
|
expect(caesar('Hello, World!', -29)).toBe('Ebiil, Tloia!');
|
2017-08-25 11:59:26 -07:00
|
|
|
});
|