diff --git a/src/PhonoChangeApplier.js b/src/PhonoChangeApplier.js index beba1bd..bd933ed 100644 --- a/src/PhonoChangeApplier.js +++ b/src/PhonoChangeApplier.js @@ -21,7 +21,6 @@ const PhonoChangeApplier = () => { // ! DONE const [ lexicon, setLexicon ] = useState(['mun', 'tʰu', 'tɯm', 'utʰ']); - // ! UNDONE const [ phonemes, setPhonemes ] = useState( { n: [ 'occlusive', 'sonorant', 'obstruent', 'nasal', 'alveolar' ], @@ -31,14 +30,15 @@ const PhonoChangeApplier = () => { t: [ 'occlusive', 'plosive', 'obstruent', 'alveolar' ], tʰ: [ 'occlusive', 'plosive', 'obstruent', 'alveolar', 'aspirated' ], } - ); - const [ epochs, setEpochs ] = useState([{name: 'epoch 1', changes:['[+ rounded]>[- rounded + unrounded]/_#']}]); - const [ options, setOptions ] = useState({output: 'default', save: false}) + ); + const [ epochs, setEpochs ] = useState([{name: 'epoch 1', changes:['[+ rounded]>[- rounded + unrounded]/_#']}]); + const [ options, setOptions ] = useState({output: 'default', save: false}) + const [ features, setFeatures ] = useState( + ['occlusive', 'sonorant', 'obstruent', 'nasal', 'alveolar','bilabial', + 'continuant','syllabic','high','back','rounded','unrounded', 'plosive','aspirated']) + // ! UNDONE const [ results, setResults ] = useState([]) const [ errors, setErrors ] = useState({}) - const [ features, setFeatures ] = useState( - ['occlusive', 'sonorant', 'obstruent', 'nasal', 'alveolar','bilabial', - 'continuant','syllabic','high','back','rounded','unrounded', 'plosive','aspirated']) const runChanges = e => { e.preventDefault(); diff --git a/src/components/SoundChangeSuite.test.js b/src/components/SoundChangeSuite.test.js index 6da3cb4..ae0733e 100644 --- a/src/components/SoundChangeSuite.test.js +++ b/src/components/SoundChangeSuite.test.js @@ -8,18 +8,26 @@ import extendExpect from '@testing-library/jest-dom/extend-expect' it('renders SoundChangeSuite without crashing', () => { const div = document.createElement('div'); - ReactDOM.render(, div); + ReactDOM.render({}} removeEpoch={()=>{}}/>, div); ReactDOM.unmountComponentAtNode(div); }); describe('SoundChangeSuite', () => { it('renders the correct subtitle', () => { - const { getByTestId } = render(); + const { getByTestId } = render( + {}} removeEpoch={()=>{}} + /> + ); expect(getByTestId('Epoch Name_SoundChangeSuite')).toHaveTextContent('Epoch Name'); }); - + it('renders a suite of soundchanges', () => { - const { getByTestId } = render(change/environment']}}/>); + const { getByTestId } = render( + change/environment']}} + updateEpoch={()=>{}} removeEpoch={()=>{}} + /> + ); expect(getByTestId('Epoch Name_SoundChangeSuite_changes')).toHaveFormValues({changes: 'sound>change/environment'}) }) }); \ No newline at end of file