Skip to content

Commit

Permalink
update build-citation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Danble committed Jan 9, 2025
1 parent b41fa87 commit 5051a86
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,27 @@ if (import.meta.vitest) {
describe(build_citation, () => {
test('default', () => {
const citation = build_citation({ t, dictionary })
expect(citation).toEqual('2024. Trabajar Living Dictionary. Living Tongues Institute for Endangered Languages. https://livingdictionaries.app/traba')
expect(citation).toEqual('2025. Trabajar Living Dictionary. Living Tongues Institute for Endangered Languages. https://livingdictionaries.app/traba')
})

test('custom citation', () => {
const citation = build_citation({ t, dictionary, custom_citation: 'Hoctur, B.J.' })
expect(citation).toEqual('Hoctur, B.J. 2024. Trabajar Living Dictionary. Living Tongues Institute for Endangered Languages. https://livingdictionaries.app/traba')
expect(citation).toEqual('Hoctur, B.J. 2025. Trabajar Living Dictionary. Living Tongues Institute for Endangered Languages. https://livingdictionaries.app/traba')
})

test('two partners', () => {
const citation = build_citation({ t, dictionary, partners: [{ name: 'The Language Team' }, { name: 'Hawaiian Linguistic Club' }] })
expect(citation).toEqual('2024. Trabajar Living Dictionary. Living Tongues Institute for Endangered Languages, The Language Team, Hawaiian Linguistic Club. https://livingdictionaries.app/traba')
expect(citation).toEqual('2025. Trabajar Living Dictionary. Living Tongues Institute for Endangered Languages, The Language Team, Hawaiian Linguistic Club. https://livingdictionaries.app/traba')
})

test('one partner, hide Living Tongues', () => {
const citation = build_citation({ t, dictionary: { ...dictionary, hideLivingTonguesLogo: true }, partners: [{ name: 'The Language Team' }] })
expect(citation).toEqual('2024. Trabajar Living Dictionary. The Language Team. https://livingdictionaries.app/traba')
expect(citation).toEqual('2025. Trabajar Living Dictionary. The Language Team. https://livingdictionaries.app/traba')
})

test('hide Living Tongues', () => {
const citation = build_citation({ t, dictionary: { ...dictionary, hideLivingTonguesLogo: true } })
expect(citation).toEqual('2024. Trabajar Living Dictionary. https://livingdictionaries.app/traba')
expect(citation).toEqual('2025. Trabajar Living Dictionary. https://livingdictionaries.app/traba')
})
})
}

0 comments on commit 5051a86

Please sign in to comment.