We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b184df4 commit 3da167fCopy full SHA for 3da167f
test/bloated.test.ts
@@ -87,5 +87,27 @@ describe('bloated documents', function() {
87
assert.strictEqual((error as Error).message, 'Schema analysis aborted: Fields count above 4');
88
}
89
});
90
+
91
+ it('does not count the same field in different documents', async function() {
92
+ const documents = [{
93
+ field1: {
94
+ field2: {
95
+ field3: 'abc'
96
+ }
97
98
+ }, {
99
100
101
+ field3: 'bca'
102
103
104
+ }];
105
+ try {
106
+ await getSchema(documents, { distinctFieldsAbortThreshold: 4 });
107
+ assert.ok('Analysis finished');
108
+ } catch (error) {
109
+ assert.fail('Analysis aborted unexpectedly');
110
111
+ });
112
113
0 commit comments