Sha256: fe05290b5538e0b8cdff941d481c13a2c4b932747293ba2a0e98005124ff2e91

Contents?: true

Size: 1.44 KB

Versions: 208

Compression:

Stored size: 1.44 KB

Contents

import PigLatin from './pig-latin';

describe('Pig Latin', () => {
  const translator = new PigLatin();

  it('translates a word beginning with a', () => {
    expect(translator.translate('apple')).toEqual('appleay');
  });

  xit('translates a word beginning with e', () => {
    expect(translator.translate('ear')).toEqual('earay');
  });

  xit('translates a word beginning with p', () => {
    expect(translator.translate('pig')).toEqual('igpay');
  });

  xit('translates a word beginning with k', () => {
    expect(translator.translate('koala')).toEqual('oalakay');
  });

  xit('translates a word beginning with ch', () => {
    expect(translator.translate('chair')).toEqual('airchay');
  });

  xit('translates a word beginning with qu', () => {
    expect(translator.translate('queen')).toEqual('eenquay');
  });

  xit('translates a word with a consonant preceding qu', () => {
    expect(translator.translate('square')).toEqual('aresquay');
  });

  xit('translates a word beginning with th', () => {
    expect(translator.translate('therapy')).toEqual('erapythay');
  });

  xit('translates a word beginning with thr', () => {
    expect(translator.translate('thrush')).toEqual('ushthray');
  });

  xit('translates a word beginning with sch', () => {
    expect(translator.translate('school')).toEqual('oolschay');
  });

  xit('translates a phrase', () => {
    expect(translator.translate('quick fast run'))
      .toEqual('ickquay astfay unray');
  });

});

Version data entries

208 entries across 208 versions & 1 rubygems

Version Path
trackler-2.1.0.53 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.52 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.51 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.50 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.49 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.48 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.47 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.46 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.45 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.44 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.43 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.42 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.41 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.40 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.39 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.38 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.37 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.36 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.34 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js
trackler-2.1.0.33 tracks/ecmascript/exercises/pig-latin/pig-latin.spec.js