Skip to content

Commit

Permalink
refactor: update keywords to use Array type and enhance value extract…
Browse files Browse the repository at this point in the history
…ion in Effect test for improved clarity
  • Loading branch information
johnie committed Oct 30, 2024
1 parent fcbc056 commit 4f56604
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/effect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('xscrape with Effect/Schema', () => {
S.Struct({
title: S.String,
description: S.String,
keywords: S.split(','),
keywords: S.Array(S.String),
views: S.Number,
}),
extract: {
Expand All @@ -21,7 +21,7 @@ describe('xscrape with Effect/Schema', () => {
},
keywords: {
selector: 'meta[name="keywords"]',
value: 'content',
value: (el) => el.attribs['content']?.split(',') || [],
},
views: {
selector: 'meta[name="views"]',
Expand Down

0 comments on commit 4f56604

Please sign in to comment.