Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions shared/test/Contributor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ describe('Contributor Tests', () => {
name: new LocalizedString('Colin Greenwood'),
}).serialize()
).toEqual({
name: { undefined: 'Colin Greenwood' },
name: { und: 'Colin Greenwood' },
});
});

Expand All @@ -187,8 +187,8 @@ describe('Contributor Tests', () => {
]),
}).serialize()
).toEqual({
name: { undefined: 'Colin Greenwood' },
sortAs: { undefined: 'greenwood' },
name: { und: 'Colin Greenwood' },
sortAs: { und: 'greenwood' },
identifier: 'colin',
altIdentifier: [{ scheme: 'http://example.com/author-id', value: 'author-22222' }],
role: ['bassist'],
Expand All @@ -211,7 +211,7 @@ describe('Contributor Tests', () => {
]).serialize()
).toEqual([
{
name: { undefined: 'Thom Yorke' },
name: { und: 'Thom Yorke' },
},
{
name: { en: 'Jonny Greenwood', fr: 'Jean Boisvert' },
Expand Down
8 changes: 4 additions & 4 deletions shared/test/LocalizedString.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('LocalizedString Tests', () => {

it('get JSON with one translation and no language', () => {
expect(new LocalizedString('a string').serialize()).toEqual({
undefined: 'a string',
und: 'a string',
});
});

Expand All @@ -42,12 +42,12 @@ describe('LocalizedString Tests', () => {
new LocalizedString({
en: 'a string',
fr: 'une chaîne',
undefined: 'bir metin',
und: 'bir metin',
}).serialize()
).toEqual({
en: 'a string',
fr: 'une chaîne',
undefined: 'bir metin',
und: 'bir metin',
});
});

Expand All @@ -74,7 +74,7 @@ describe('LocalizedString Tests', () => {
new LocalizedString({
foo: 'a string',
bar: 'une chaîne',
undefined: 'Surgh',
und: 'Surgh',
}).getTranslation()
).toEqual('Surgh');
});
Expand Down
4 changes: 2 additions & 2 deletions shared/test/Manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe('Manifest Tests', () => {
readingOrder: new Links([]),
}).serialize()
).toEqual({
metadata: { title: { undefined: 'Title' } },
metadata: { title: { und: 'Title' } },
links: [],
readingOrder: [],
});
Expand Down Expand Up @@ -177,7 +177,7 @@ describe('Manifest Tests', () => {
}).serialize()
).toEqual({
'@context': ['https://readium.org/webpub-manifest/context.jsonld'],
metadata: { title: { undefined: 'Title' } },
metadata: { title: { und: 'Title' } },
links: [{ href: '/manifest.json', rel: ['self'] }],
readingOrder: [{ href: '/chap1.html', type: 'text/html' }],
resources: [{ href: '/image.png', type: 'image/png' }],
Expand Down
40 changes: 20 additions & 20 deletions shared/test/Metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ describe('Metadata Tests', () => {
title: new LocalizedString('Title'),
}).serialize()
).toEqual({
title: { undefined: 'Title' },
title: { und: 'Title' },
});
});

Expand Down Expand Up @@ -393,31 +393,31 @@ describe('Metadata Tests', () => {
language: ['en', 'fr'],
sortAs: { en: 'sort key', fr: 'clé de tri' },
subject: [
{ name: { undefined: 'Science Fiction' } },
{ name: { undefined: 'Fantasy' } },
{ name: { und: 'Science Fiction' } },
{ name: { und: 'Fantasy' } },
],
author: [{ name: { undefined: 'Author' } }],
translator: [{ name: { undefined: 'Translator' } }],
editor: [{ name: { undefined: 'Editor' } }],
artist: [{ name: { undefined: 'Artist' } }],
illustrator: [{ name: { undefined: 'Illustrator' } }],
letterer: [{ name: { undefined: 'Letterer' } }],
penciler: [{ name: { undefined: 'Penciler' } }],
colorist: [{ name: { undefined: 'Colorist' } }],
inker: [{ name: { undefined: 'Inker' } }],
narrator: [{ name: { undefined: 'Narrator' } }],
contributor: [{ name: { undefined: 'Contributor' } }],
publisher: [{ name: { undefined: 'Publisher' } }],
imprint: [{ name: { undefined: 'Imprint' } }],
author: [{ name: { und: 'Author' } }],
translator: [{ name: { und: 'Translator' } }],
editor: [{ name: { und: 'Editor' } }],
artist: [{ name: { und: 'Artist' } }],
illustrator: [{ name: { und: 'Illustrator' } }],
letterer: [{ name: { und: 'Letterer' } }],
penciler: [{ name: { und: 'Penciler' } }],
colorist: [{ name: { und: 'Colorist' } }],
inker: [{ name: { und: 'Inker' } }],
narrator: [{ name: { und: 'Narrator' } }],
contributor: [{ name: { und: 'Contributor' } }],
publisher: [{ name: { und: 'Publisher' } }],
imprint: [{ name: { und: 'Imprint' } }],
layout: 'fixed',
readingProgression: 'rtl',
description: 'Description',
duration: 4.24,
numberOfPages: 240,
belongsTo: {
collection: [{ name: { undefined: 'Collection' } }],
series: [{ name: { undefined: 'Series' } }],
'schema:Periodical': [{ name: { undefined: 'Periodical' } }],
collection: [{ name: { und: 'Collection' } }],
series: [{ name: { und: 'Series' } }],
'schema:Periodical': [{ name: { und: 'Periodical' } }],
},
tdm: {
reservation: 'all',
Expand Down Expand Up @@ -451,7 +451,7 @@ describe('Metadata Tests', () => {
title: new LocalizedString('Title'),
}).serialize()
).toEqual({
title: { undefined: 'Title' }
title: { und: 'Title' }
});
});

Expand Down
10 changes: 5 additions & 5 deletions shared/test/Subject.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('Subject Tests', () => {
name: new LocalizedString('Science Fiction'),
}).serialize()
).toEqual({
name: { undefined: 'Science Fiction' },
name: { und: 'Science Fiction' },
});
});

Expand All @@ -141,8 +141,8 @@ describe('Subject Tests', () => {
]),
}).serialize()
).toEqual({
name: { undefined: 'Science Fiction' },
sortAs: { undefined: 'science-fiction' },
name: { und: 'Science Fiction' },
sortAs: { und: 'science-fiction' },
scheme: 'http://scheme',
code: 'CODE',
links: [{ href: 'pub1' }, { href: 'pub2' }],
Expand All @@ -160,10 +160,10 @@ describe('Subject Tests', () => {
]).serialize()
).toEqual([
{
name: { undefined: 'Fantasy' },
name: { und: 'Fantasy' },
},
{
name: { undefined: 'Science Fiction' },
name: { und: 'Science Fiction' },
scheme: 'http://scheme',
},
]);
Expand Down