Skip to content

Commit 6f5eb27

Browse files
committed
chore: renamed early-access-header and added test file
1 parent 2426039 commit 6f5eb27

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface Config {
5555
live_preview?: LivePreview;
5656
plugins?: ContentstackPlugin[];
5757
fetchOptions?: FetchOptions;
58-
ea_headers?: string[]
58+
early_access_headers?: string[]
5959
}
6060
// Stack Config
6161
export interface StackConfig {

test/entry/find.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ test('Initalise the Contentstack Stack Instance', function(TC) {
2020
}, 1000);
2121
});
2222

23+
test.only('early_access_headers in stack initialization', function (t) {
24+
const stack = Contentstack.Stack({ ...init.stack, early_access_headers: ['newCDA', 'taxonomy'] });
25+
t.equal(stack.headers['x-header-ea'], 'newCDA,taxonomy', 'Early access headers should be added');
26+
t.end();
27+
});
28+
2329
test('default .find()', function(assert) {
2430
var Query = Stack.ContentType(contentTypes.source).Query(),
2531
field = 'updated_at';

0 commit comments

Comments
 (0)