mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-11 12:12:55 +00:00
test: add tests for translatedThingType function
This commit is contained in:
@@ -263,6 +263,16 @@ export class MetaTranslationSpec {
|
|||||||
expect(dishMetaTranslationsEN).to.deep.equal(SCDishMeta.getInstance().fieldTranslations.en);
|
expect(dishMetaTranslationsEN).to.deep.equal(SCDishMeta.getInstance().fieldTranslations.en);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test
|
||||||
|
public retrieveTranslatedThingType() {
|
||||||
|
const dishTypeDE = translator.translatedThingType(dish.type);
|
||||||
|
const dishTypeEN = translator.translatedThingType(dish.type, 'en');
|
||||||
|
const dishTypeBASE = translatorWithFallback.translatedThingType(dish.type);
|
||||||
|
expect(dishTypeDE).to.deep.equal(SCDishMeta.getInstance().fieldValueTranslations.de.type);
|
||||||
|
expect(dishTypeEN).to.deep.equal(SCDishMeta.getInstance().fieldValueTranslations.en.type);
|
||||||
|
expect(dishTypeBASE).to.deep.equal(SCDishMeta.getInstance().fieldValueTranslations.en.type);
|
||||||
|
}
|
||||||
|
|
||||||
@test
|
@test
|
||||||
public thingWithoutMetaClass() {
|
public thingWithoutMetaClass() {
|
||||||
const dishCopy = clone(dish);
|
const dishCopy = clone(dish);
|
||||||
|
|||||||
Reference in New Issue
Block a user