|
| 1 | +import translate from require 'pig_latin' |
| 2 | + |
| 3 | +describe 'pig-latin', -> |
| 4 | + describe 'ay is added to words that start with vowels', -> |
| 5 | + it 'word beginning with a', -> |
| 6 | + assert.are.equal 'appleay', translate 'apple' |
| 7 | + |
| 8 | + pending 'word beginning with e', -> |
| 9 | + assert.are.equal 'earay', translate 'ear' |
| 10 | + |
| 11 | + pending 'word beginning with i', -> |
| 12 | + assert.are.equal 'iglooay', translate 'igloo' |
| 13 | + |
| 14 | + pending 'word beginning with o', -> |
| 15 | + assert.are.equal 'objectay', translate 'object' |
| 16 | + |
| 17 | + pending 'word beginning with u', -> |
| 18 | + assert.are.equal 'underay', translate 'under' |
| 19 | + |
| 20 | + pending 'word beginning with a vowel and followed by a qu', -> |
| 21 | + assert.are.equal 'equalay', translate 'equal' |
| 22 | + |
| 23 | + describe 'first letter and ay are moved to the end of words that start with consonants', -> |
| 24 | + pending 'word beginning with p', -> |
| 25 | + assert.are.equal 'igpay', translate 'pig' |
| 26 | + |
| 27 | + pending 'word beginning with k', -> |
| 28 | + assert.are.equal 'oalakay', translate 'koala' |
| 29 | + |
| 30 | + pending 'word beginning with x', -> |
| 31 | + assert.are.equal 'enonxay', translate 'xenon' |
| 32 | + |
| 33 | + pending 'word beginning with q without a following u', -> |
| 34 | + assert.are.equal 'atqay', translate 'qat' |
| 35 | + |
| 36 | + pending 'word beginning with consonant and vowel containing qu', -> |
| 37 | + assert.are.equal 'iquidlay', translate 'liquid' |
| 38 | + |
| 39 | + describe 'some letter clusters are treated like a single consonant', -> |
| 40 | + pending 'word beginning with ch', -> |
| 41 | + assert.are.equal 'airchay', translate 'chair' |
| 42 | + |
| 43 | + pending 'word beginning with qu', -> |
| 44 | + assert.are.equal 'eenquay', translate 'queen' |
| 45 | + |
| 46 | + pending 'word beginning with qu and a preceding consonant', -> |
| 47 | + assert.are.equal 'aresquay', translate 'square' |
| 48 | + |
| 49 | + pending 'word beginning with th', -> |
| 50 | + assert.are.equal 'erapythay', translate 'therapy' |
| 51 | + |
| 52 | + pending 'word beginning with thr', -> |
| 53 | + assert.are.equal 'ushthray', translate 'thrush' |
| 54 | + |
| 55 | + pending 'word beginning with sch', -> |
| 56 | + assert.are.equal 'oolschay', translate 'school' |
| 57 | + |
| 58 | + describe 'some letter clusters are treated like a single vowel', -> |
| 59 | + pending 'word beginning with yt', -> |
| 60 | + assert.are.equal 'yttriaay', translate 'yttria' |
| 61 | + |
| 62 | + pending 'word beginning with xr', -> |
| 63 | + assert.are.equal 'xrayay', translate 'xray' |
| 64 | + |
| 65 | + describe 'position of y in a word determines if it is a consonant or a vowel', -> |
| 66 | + pending 'y is treated like a consonant at the beginning of a word', -> |
| 67 | + assert.are.equal 'ellowyay', translate 'yellow' |
| 68 | + |
| 69 | + pending 'y is treated like a vowel at the end of a consonant cluster', -> |
| 70 | + assert.are.equal 'ythmrhay', translate 'rhythm' |
| 71 | + |
| 72 | + pending 'y as second letter in two letter word', -> |
| 73 | + assert.are.equal 'ymay', translate 'my' |
| 74 | + |
| 75 | + describe 'phrases are translated', -> |
| 76 | + pending 'a whole phrase', -> |
| 77 | + assert.are.equal 'ickquay astfay unray', translate 'quick fast run' |
0 commit comments