TypeScript migration #55
GitHub Actions / Mocha test results
succeeded
Sep 12, 2023 in 0s
Mocha test results β
β Β test-results.json
160 tests were completed in 18s with 160 passed, 0 failed and 0 skipped.
β Β test/func/alias.js
updateAliasSet
β
should allow only one primary alias per language
β
should allow only the default alias to be primary for that language
β
should error if a set of aliases is passed with no default
β
should return a new set if changes are made to the aliases in the set
β
should return a new set if the default alias is changed
β
should return a set with one alias if one alias is added to an empty set
β
should return null if all null/empty sets are passed
β
should return the old set if no changes are made
β Β test/func/area.js
recursivelyGetAreaParentsWithNames
β
should return all levels when checkAllLevels is true
β
should return an array of areas with their names, sorted by type
β
should work when calling parents() on an Area model
β Β test/func/author-credit.js
fetchOrCreateCredit
β
should create a single author credit if called twice
updateCreateCredit
β
should return a new credit if the credit is updated
β
should return the original credit if changed, and then reverted
β
should return the original credit if the credit is unchanged
β Β test/func/entity.js
getEntity
β
should return an entity
β
should return an entity with extra relations
β
should return the target entity for a redirected bbid
recursivelyGetRedirectBBID
β
should return a multiple-step redirected bbid
β
should return a single-step redirected bbid
β Β test/func/externalServiceOauth.js
deleteOauthToken
β
should delete oauth token
getOauthToken
β
should return oauth token
saveOauthToken
β
should save oauth token and return the saved token
updateOauthToken
β
should update oauth token
β Β test/func/identifier.js
updateIdentifierSet
β
should return a new set if changes are made to the identifiers in the set
β
should return a set with one identifier if one identifier is added to an empty set
β
should return null if all null/empty sets are passed
β
should return the old set if no changes are made
β Β test/func/language.js
updateLanguageSet
β
should return a set with one language if one language is added to an empty set
β
should return null if all null/empty sets are passed
β
should return the old set if no changes are made
β Β test/func/relationship.js
updateRelationshipSet
β
should return a new set if changes are made to the relationships in the set
β
should return an empty object if all null/empty sets are passed
β
should return an object with two entries if one relationship is added to an empty set
β
should return the old set if no changes are made
β Β test/func/relationshipAttributes.js
updateRelationshipAttributeSet
β
should return a new set if changes are made to the attributes in the set
β
should return a set with one attribute if one attribute is added to an empty set
β
should return null if all null/empty sets are passed
β
should return the old set if no changes are made
β Β test/func/set.js
createNewSetWithItems
β
should error out if non-existent unchanged items are provided
β
should return a new set with one item if an item is added
β
should return a new set with two items if an item is added to an existing unchanged item
β
should return null if no items are provided
getAddedItems
β
should return a single element when one element is different
β
should return a single element when one element is different and duplicated
β
should return an empty list for two arrays of identical objects
getRemovedItems
β
should return a single element when one element is different
β
should return a single element when one element is different and duplicated
β
should return an empty list for two arrays of identical objects
getUnchangedItems
β
should return a single element when one duplicated element is the same
β
should return a single element when one element is different
β
should return all objects for two arrays of identical objects
removeItemsFromSet
β
should return a single element when one element is different
β
should return a single element when one element is different and duplicated
β
should return an empty list for two arrays of identical objects
β Β test/func/work.js
loadAuthorNames
β
should return an array of objects with appropriate keys when the list of workBBIDs is not empty
β
should return an empty array if the list of workBBIDs is empty
β Β test/testAchievementType.js
AchievementType model
β
should return a JSON object with correct keys when saved
β Β test/testAchievementUnlock.js
AchievementUnlock model
β
should return a JSON object with correct keys when saved
β Β test/testAlias.js
Alias model
β
should return a JSON object with correct keys when saved
β Β test/testAliasSet.js
AliasSet model
β
should have an empty list of aliases when none are attached
β
should have have an alias when one is set
β
should have have two aliases when two are set
β
should return a JSON object with correct keys when saved
β Β test/testAnnotation.js
Annotation model
β
should return a JSON object with correct keys when saved
β Β test/testArea.js
Area model
β
should return a JSON object with correct keys when saved
AreaType model
β
should be fetched as relationship when fetching Area
β
should return a JSON object with correct keys when saved
β Β test/testAuthor.js
Author model
β
should return a JSON object with correct keys when saved
β
should return a JSON object with empty collections array
β
should return a JSON object with related collections if there exist any
β
should return the master revision when multiple revisions exist
Author model with Author Credits
β
should return the associated Author Credits for an Author
β
should return the associated Edition Groups using creditedEditionGroups method
β
should return the associated Editions using creditedEditions method
β Β test/testAuthorRevision.js
AuthorRevision model
β
should return a JSON object with correct keys when saved
β Β test/testDisambiguation.js
Disambiguation model
β
should return a JSON object with correct keys when saved
β Β test/testEdition.js
Edition model
β
should automatically create an Edition Group editionGroupBbid has been unset in existing Edition
β
should automatically create an Edition Group if none has been passed
β
should return a JSON object with correct keys when saved
β
should return a JSON object with empty collections array
β
should return a JSON object with related collections if there exist any
β
should return the master revision when multiple revisions exist
β
should set the same Author Credit on auto-created Edition Group
β Β test/testEditionGroup.js
EditionGroup model
β
should return a JSON object with correct keys when saved
β
should return a JSON object with empty collections array
β
should return a JSON object with related collections if there exist any
β
should return the master revision when multiple revisions exist
β Β test/testEditionGroupRevision.js
EditionGroupRevision model
β
should return a JSON object with correct keys when saved
β Β test/testEditionRevision.js
EditionRevision model
β
should return a JSON object with correct keys when saved
β Β test/testEditor.js
Editor model
β
should return a JSON object with correct keys when saved
β Β test/testEditorEntityVisits.js
EditorEntityVisits model
β
should return a JSON object with correct keys when saved
β Β test/testEditorType.js
EditorType model
β
should return a JSON object with correct keys when saved
β Β test/testEntity.js
Entity model
β
should return a JSON object with correct keys when saved
β Β test/testExternalServiceOauth.js
ExternalServiceOauth model
β
should return a JSON object with correct keys when saved
β Β test/testGender.js
Gender model
β
should return a JSON object with correct keys when saved
β Β test/testIdentifier.js
Identifier model
β
should return a JSON object with correct keys when saved
β Β test/testIdentifierSet.js
IdentifierSet model
β
should have an empty list of identifiers when none are attached
β
should have have an identifier when one is set
β
should have have two identifiers when two are set
β
should return a JSON object with correct keys when saved
β Β test/testIdentifierType.js
IdentifierType model
β
should return a JSON object with correct keys when saved
β Β test/testLanguage.js
Language model
β
should return a JSON object with correct keys when saved
β Β test/testLanguageSet.js
LanguageSet model
β
should have an empty list of languages when none are attached
β
should have have a language when one is set
β
should have have two languages when two are set
β
should return a JSON object with correct keys when saved
β Β test/testModule.js
Module
β
should have a bookshelf property with a knex property
β
should have bookshelf and utils properties
β
should return one model for each file in the models directory
β Β test/testPublisher.js
Publisher model
β
should return a JSON object with correct keys when saved
β
should return a JSON object with empty collections array
β
should return a JSON object with related collections if there exist any
β
should return the master revision when multiple revisions exist
β Β test/testPublisherRevision.js
PublisherRevision model
β
should return a JSON object with correct keys when saved
β Β test/testRelationship.js
Relationship model
β
should return a JSON object with correct keys when saved
β
should return a relationship with it's attributes when one is set
β Β test/testRelationshipAttributes.js
Relationship Attribute model
β
should return a JSON object with correct keys when saved
β Β test/testRelationshipAttributeSet.js
RelationshipAttributeSet model
β
should have an empty list of attributes when none are attached
β
should have have a relationship attribute when one is set
β
should have have two relationship attributes when two are set
β
should return a JSON object with correct keys when saved
β Β test/testRelationshipAttributeType.js
RelationshipAttributeType model
β
should return a JSON object with correct keys when saved
β Β test/testRelationshipSet.js
RelationshipSet model
β
should have an empty list of relationships when none are attached
β
should have have a relationship when one is set
β
should have have two relationships when two are set
β
should return a JSON object with correct keys when saved
β Β test/testRelationshipType.js
RelationshipType model
β
should return a JSON object with correct keys when saved
β
should return attribute type associated with the relationship type
β Β test/testRevision.js
Revision model
β
should return a JSON object with correct keys when saved
β Β test/testSeries.js
Series model
β
should allow to update the series ordering type
β
should return a JSON object with correct keys when saved
β
should return a JSON object with empty collections array
β
should return a JSON object with related collections
β
should return the master revision when multiple revisions exist
β Β test/testSeriesOrderingType.js
SeriesOrderingType model
β
should return a JSON object with correct keys when saved
β Β test/testSeriesRevision.js
SeriesRevision model
β
should return a JSON object with correct keys when saved
β Β test/testTitleType.js
TitleType model
β
should return a JSON object with correct keys when saved
β Β test/testTitleUnlock.js
TitleUnlock model
β
should return a JSON object with correct keys when saved
β Β test/testUserCollection.js
UserCollection model
β
should return a JSON object with itemCount when saved and fetched with withItemCount flag
β
should return a JSON object without itemCount when saved and fetched without withItemCount flag
β Β test/testWork.js
Work model
β
should return a JSON object with correct keys when saved
β
should return a JSON object with empty collections array
β
should return a JSON object with related collections
β
should return the master revision when multiple revisions exist
β Β test/testWorkRevision.js
WorkRevision model
β
should return a JSON object with correct keys when saved
β Β test/util.js
Utils formatDate
β
should allow negative years for full date and with missing month and/or day
β
should return null when passed an invalid date object
β
should return the date as ISO 8601 for a date object with missing month
β
should return the date as ISO 8601 for a date object with missing month and day
β
should return the date as ISO 8601 for a date object with year equal to zero
β
should return the date as ISO 8601 for a full date object
Utils parseDate
β
should allow BCE dates as extended ISO 8601-2004 date string
β
should allow partial BCE dates as extended ISO 8601-2004 with missing day
β
should allow partial BCE dates as extended ISO 8601-2004 with missing day and month
β
should allow partial dates with missing day
β
should allow partial dates with missing day and month
β
should return an array of 3 null values when passed an invalid string (other than ISO 8601)
β
should return the date as an array of 3 values when passed a full ISO 8601 date string
β
should return the date as an array of 3 values when passed an extended ISO 8601-2004 date string
Loading