JenMorgan / js-learning

0 stars 0 forks source link

Implement `saesarCipher` function #56

Open kartamyshev opened 4 years ago

kartamyshev commented 4 years ago
it('"zoo keeper" -> "bqq mggrgt"', () => {
    expect(caesarCipher('zoo keeper', 2)).toBe('bqq mggrgt');
  });
  it('"zoo keeper" -> "ynn jddodq"', () => {
    expect(caesarCipher('zoo keeper', -1)).toBe('ynn jddodq');
  });
  it('"aaa" -> "ddd"', () => {
    expect(caesarCipher('aaa', 3)).toBe('ddd');
  });
  it('"aaa" -> "aaa"', () => {
    expect(caesarCipher('aaa', 0)).toBe('aaa');
  });
  it('"ddd" -> "aaa"', () => {
    expect(caesarCipher('ddd', -3)).toBe('aaa');
  });
  it('"aaa" -> "www"', () => {
    expect(caesarCipher('aaa', -4)).toBe('www');
  });
  it('"aaa" -> "bbb"', () => {
    expect(caesarCipher('aaa', 27)).toBe('bbb');
  });
  it('"aaa" -> "aaa"', () => {
    expect(caesarCipher('aaa', 26)).toBe('aaa');
  });