Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.

Commit 37c389c

Browse files
committed
feat: change config type
1 parent 2c30aae commit 37c389c

File tree

6 files changed

+669
-621
lines changed

6 files changed

+669
-621
lines changed

packages/jsonld-tools/__tests__/builder/config-merging.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ describe('Config Merging Behavior', () => {
128128
.clearPropertyFilters()
129129
.getConfig();
130130

131-
expect(config.propertyFiltersByIds).toBeUndefined();
132-
expect(config.propertyFiltersByTypes).toBeUndefined();
131+
expect(config.filters?.propertyFiltersByIds).toBeUndefined();
132+
expect(config.filters?.propertyFiltersByTypes).toBeUndefined();
133133
});
134134

135135
test('clearSubgraph clears subgraph roots', () => {
136136
const config = createJsonLdConfig().subgraph(['org:hyperweb']).clearSubgraph().getConfig();
137137

138-
expect(config.subgraphRoots).toBeUndefined();
138+
expect(config.filters?.subgraphRoots).toBeUndefined();
139139
});
140140

141141
test('clearAll clears everything except baseGraph', () => {

packages/jsonld-tools/__tests__/builder/general.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ describe('JsonLdConfigBuilder', () => {
3535
.filterPropertiesByIds(['org:hyperweb'], { exclude: ['member'] })
3636
.getConfig();
3737

38-
expect(config.propertyFiltersByIds).toMatchSnapshot();
38+
expect(config.filters?.propertyFiltersByIds).toMatchSnapshot();
3939
});
4040

4141
test('supports property filtering by types', () => {
4242
const config = createJsonLdConfig()
4343
.filterPropertiesByTypes(['Article'], { include: ['headline', 'author'] })
4444
.getConfig();
4545

46-
expect(config.propertyFiltersByTypes).toMatchSnapshot();
46+
expect(config.filters?.propertyFiltersByTypes).toMatchSnapshot();
4747
});
4848

4949
test('supports chaining multiple configurations', () => {
@@ -61,13 +61,13 @@ describe('JsonLdConfigBuilder', () => {
6161
expect(config.filters?.excludeTypes).toEqual(['ImageObject']);
6262
expect(config.filters?.maxEntities).toBe(10);
6363
expect(config.filters?.requiredProperties).toEqual(['name']);
64-
expect(config.propertyFiltersByIds).toHaveLength(1);
64+
expect(config.filters?.propertyFiltersByIds).toHaveLength(1);
6565
});
6666

6767
test('supports subgraph extraction configuration', () => {
6868
const config = createJsonLdConfig().baseGraph(graph).subgraph(['person:danlynch']).getConfig();
6969

70-
expect(config.subgraphRoots).toMatchSnapshot();
70+
expect(config.filters?.subgraphRoots).toMatchSnapshot();
7171
});
7272

7373
test('supports adding additional entities', () => {

0 commit comments

Comments
 (0)