Skip to content

Commit 435d3a2

Browse files
author
aciobanasu
committed
feat: Added missing tests
1 parent 780ce16 commit 435d3a2

File tree

1 file changed

+18
-1
lines changed
  • packages/spacecat-shared-data-access/test/unit/models/site

1 file changed

+18
-1
lines changed

packages/spacecat-shared-data-access/test/unit/models/site/config.test.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,6 +1164,12 @@ describe('Config Tests', () => {
11641164
sources: ['rum'],
11651165
enabled: true,
11661166
},
1167+
{
1168+
type: 'cwv-trends-onboard',
1169+
destinations: ['default'],
1170+
sources: ['rum'],
1171+
enabled: true,
1172+
},
11671173
],
11681174
fetchConfig: {
11691175
headers: {
@@ -1217,7 +1223,7 @@ describe('Config Tests', () => {
12171223
.to.throw().and.satisfy((error) => {
12181224
expect(error.message).to.include('Configuration validation error');
12191225
expect(error.cause.details[0].context.message)
1220-
.to.equal('"imports[0].type" must be [llmo-prompts-ahrefs]. "imports[0].destinations[0]" must be [default]. "imports[0].type" must be [organic-keywords-nonbranded]. "imports[0].type" must be [organic-keywords-ai-overview]. "imports[0].type" must be [organic-keywords-feature-snippets]. "imports[0].type" must be [organic-keywords-questions]. "imports[0].type" must be [organic-traffic]. "imports[0].type" must be [all-traffic]. "imports[0].type" must be [top-pages]. "imports[0].type" must be [ahref-paid-pages]. "imports[0].type" must be [cwv-daily]. "imports[0].type" must be [cwv-weekly]. "imports[0].type" must be [traffic-analysis]. "imports[0].type" must be [top-forms]. "imports[0].type" must be [user-engagement]. "imports[0].type" must be [cwv-trends-daily]');
1226+
.to.equal('"imports[0].type" must be [llmo-prompts-ahrefs]. "imports[0].destinations[0]" must be [default]. "imports[0].type" must be [organic-keywords-nonbranded]. "imports[0].type" must be [organic-keywords-ai-overview]. "imports[0].type" must be [organic-keywords-feature-snippets]. "imports[0].type" must be [organic-keywords-questions]. "imports[0].type" must be [organic-traffic]. "imports[0].type" must be [all-traffic]. "imports[0].type" must be [top-pages]. "imports[0].type" must be [ahref-paid-pages]. "imports[0].type" must be [cwv-daily]. "imports[0].type" must be [cwv-weekly]. "imports[0].type" must be [traffic-analysis]. "imports[0].type" must be [top-forms]. "imports[0].type" must be [user-engagement]. "imports[0].type" must be [cwv-trends-daily]. "imports[0].type" must be [cwv-trends-onboard]');
12211227
expect(error.cause.details[0].context.details)
12221228
.to.eql([
12231229
{
@@ -1383,6 +1389,17 @@ describe('Config Tests', () => {
13831389
key: 'type',
13841390
},
13851391
},
1392+
{
1393+
message: '"imports[0].type" must be [cwv-trends-onboard]',
1394+
path: ['imports', 0, 'type'],
1395+
type: 'any.only',
1396+
context: {
1397+
valids: ['cwv-trends-onboard'],
1398+
label: 'imports[0].type',
1399+
value: 'organic-keywords',
1400+
key: 'type',
1401+
},
1402+
},
13861403
]);
13871404
return true;
13881405
});

0 commit comments

Comments
 (0)