-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.test.js
48 lines (28 loc) · 1.2 KB
/
index.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import createDefaultTest from './test/createDefaultTest.js'
import dlx2scription from './index.js'
import { expect } from 'chai'
import fixtures from './test/index.js'
import { describe, it, test } from 'node:test'
describe(`dlx2scription`, function() {
describe(`library`, function() {
it(`converts multiple utterances`, createDefaultTest(`multiple-utterances`))
})
describe(`lines`, function() {
test(`metadata`, createDefaultTest(`metadata`))
test(`transcription: single orthography`, createDefaultTest(`transcription-single`))
test(`transcription: multiple orthographies`, function() {
const { data } = fixtures.get(`transcription-multiple`)
const result = dlx2scription(data)
const expected = `qaxtiqi\nʔaštiʔi\nHelloǃ`
expect(result).to.equal(expected)
})
test(`translation: single language`, createDefaultTest(`translation-single`))
test(`translation: multiple languages`, function() {
const { data } = fixtures.get(`translation-multiple`)
const result = dlx2scription(data)
const expected = `Jambo\nHello\nBonjour`
expect(result).to.equal(expected)
})
})
describe(`options`)
})