coh-content-db 2.0.0-rc.7 → 2.0.0-rc.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,67 +0,0 @@
1
- import { BundleMetadata } from '../../main'
2
- import { contentBundleFixture } from '../api/content-bundle.fixture'
3
-
4
- describe(BundleMetadata.name, () => {
5
- describe('Constructor', () => {
6
- test(`should accept the test fixture`, () => {
7
- new BundleMetadata(contentBundleFixture.create())
8
- })
9
- })
10
-
11
- describe('name', () => {
12
- test(`should be read from the bundle`, () => {
13
- const bundle = new BundleMetadata(contentBundleFixture.create({ name: 'foo' }))
14
- expect(bundle.name).toBe('foo')
15
- })
16
- })
17
-
18
- describe('description', () => {
19
- test(`should be read from the bundle`, () => {
20
- const bundle = new BundleMetadata(contentBundleFixture.create({ description: 'foo' }))
21
- expect(bundle.description).toBe('foo')
22
- })
23
-
24
- test(`should be optional`, () => {
25
- const bundle = new BundleMetadata(contentBundleFixture.omit('description').create())
26
- expect(bundle.description).toBeUndefined()
27
- })
28
- })
29
-
30
- describe('repository', () => {
31
- test(`should be read from the bundle`, () => {
32
- const bundle = new BundleMetadata(contentBundleFixture.create({ repository: 'foo' }))
33
- expect(bundle.repository).toBe('foo')
34
- })
35
-
36
- test(`should be optional`, () => {
37
- const bundle = new BundleMetadata(contentBundleFixture.omit('repository').create())
38
- expect(bundle.repository).toBeUndefined()
39
- })
40
- })
41
-
42
- describe('links', () => {
43
- test(`should be read from the bundle`, () => {
44
- const bundle = new BundleMetadata(contentBundleFixture.create({ links: [{ title: 'foo', href: 'bar' }] }))
45
- expect(bundle.links).toStrictEqual([{ title: 'foo', href: 'bar' }])
46
- })
47
-
48
- test(`should be optional`, () => {
49
- const bundle = new BundleMetadata(contentBundleFixture.omit('links').create())
50
- expect(bundle.links).toHaveLength(0)
51
- })
52
- })
53
-
54
- describe('changelog', () => {
55
- test(`should be read from the bundle`, () => {
56
- const bundle = new BundleMetadata(contentBundleFixture.create({
57
- changelog: [{ version: 'foo', date: new Date('2025-03-12'), description: 'bar' }],
58
- }))
59
- expect(bundle.changelog).toStrictEqual([{ version: 'foo', date: new Date('2025-03-12'), description: 'bar' }])
60
- })
61
-
62
- test(`should be optional`, () => {
63
- const bundle = new BundleMetadata(contentBundleFixture.omit('changelog').create())
64
- expect(bundle.changelog).toHaveLength(0)
65
- })
66
- })
67
- })
@@ -1,14 +0,0 @@
1
- import * as index from '../main/index'
2
-
3
- test('should export the changelog', () => {
4
- expect(index).toHaveProperty('CHANGELOG')
5
- })
6
-
7
- test('should export badge reference utils', () => {
8
- expect(index).toHaveProperty('badgeUri')
9
- expect(index).toHaveProperty('badgeLink')
10
- expect(index).toHaveProperty('contactUri')
11
- expect(index).toHaveProperty('contactLink')
12
- expect(index).toHaveProperty('zoneUri')
13
- expect(index).toHaveProperty('zoneLink')
14
- })