Skip to content

Commit

Permalink
DEV: Order tests alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhieb committed Apr 9, 2024
1 parent 8ff697c commit 8853c4a
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 193 deletions.
100 changes: 50 additions & 50 deletions test/utterance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,56 @@ describe(`utterance`, function() {

})

describe(`phonemic transcription`, function() {

it(`produces one line per orthography`, async function() {

const scription = `
\\txn-mod waxdungu qasi
\\txn-swad wašdungu ʔasi
\\txn-apa waštʼunkʼu ʔasi
\\m waxt-qungu qasi
\\gl day-one man
\\tln one day a man
`

const { dom } = await parse(scription)
const [ex] = dom.childNodes
const transcripts = findElementsByClass(ex, `txn`)

expect(transcripts).to.have.length(3)

const [mod, swad, apa] = transcripts

expect(getAttribute(mod, `data-ortho`)).to.equal(`mod`)
expect(getAttribute(swad, `data-ortho`)).to.equal(`swad`)
expect(getAttribute(apa, `data-ortho`)).to.equal(`apa`)

expect(getTextContent(mod)).to.equal(`waxdungu qasi`)
expect(getTextContent(swad)).to.equal(`wašdungu ʔasi`)
expect(getTextContent(apa)).to.equal(`waštʼunkʼu ʔasi`)

})

it(`renders emphasis`, async function() {

const scription = `
\\txn wax*d*ungu qasi
\\m waxt-qungu qasi
\\gl day-one man
\\tln one day a man
`

const { dom } = await parse(scription)
const txn = findElementByClass(dom, `txn`)
const b = findElement(txn, el => getTagName(el) === `b`)

expect(getTextContent(b)).to.equal(`d`)

})

})

describe(`phonetic transcription`, function() {

it(`renders`, async function() {
Expand Down Expand Up @@ -200,56 +250,6 @@ describe(`utterance`, function() {

})

describe(`phonemic transcription`, function() {

it(`produces one line per orthography`, async function() {

const scription = `
\\txn-mod waxdungu qasi
\\txn-swad wašdungu ʔasi
\\txn-apa waštʼunkʼu ʔasi
\\m waxt-qungu qasi
\\gl day-one man
\\tln one day a man
`

const { dom } = await parse(scription)
const [ex] = dom.childNodes
const transcripts = findElementsByClass(ex, `txn`)

expect(transcripts).to.have.length(3)

const [mod, swad, apa] = transcripts

expect(getAttribute(mod, `data-ortho`)).to.equal(`mod`)
expect(getAttribute(swad, `data-ortho`)).to.equal(`swad`)
expect(getAttribute(apa, `data-ortho`)).to.equal(`apa`)

expect(getTextContent(mod)).to.equal(`waxdungu qasi`)
expect(getTextContent(swad)).to.equal(`wašdungu ʔasi`)
expect(getTextContent(apa)).to.equal(`waštʼunkʼu ʔasi`)

})

it(`renders emphasis`, async function() {

const scription = `
\\txn wax*d*ungu qasi
\\m waxt-qungu qasi
\\gl day-one man
\\tln one day a man
`

const { dom } = await parse(scription)
const txn = findElementByClass(dom, `txn`)
const b = findElement(txn, el => getTagName(el) === `b`)

expect(getTextContent(b)).to.equal(`d`)

})

})

describe(`source`, function() {

it(`is not present when there is no data`, async function() {
Expand Down
Loading

0 comments on commit 8853c4a

Please sign in to comment.