Skip to content

Commit bb231ad

Browse files
Added typescript testcases
1 parent 69dba47 commit bb231ad

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

test/entry/find.js

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

23-
test('early_access in stack initialization', function (t) {
24-
const stack = Contentstack.Stack({ ...init.stack, early_access: ['newCDA', 'taxonomy'] });
25-
t.equal(stack.headers['x-header-ea'], 'newCDA,taxonomy', 'Early access headers should be added');
26-
t.end();
27-
});
23+
// test('early_access in stack initialization', function (t) {
24+
// const stack = Contentstack.Stack({ ...init.stack, early_access: ['newCDA', 'taxonomy'] });
25+
// t.equal(stack.headers['x-header-ea'], 'newCDA,taxonomy', 'Early access headers should be added');
26+
// t.end();
27+
// });
2828

2929
test('default .find()', function(assert) {
3030
var Query = Stack.ContentType(contentTypes.source).Query(),
@@ -1662,7 +1662,7 @@ test('CT Taxonomies Query: Get Entries With Taxonomy Terms Parent and Excluding
16621662
test('Variants in entry', function (t) {
16631663
let Query = Stack.ContentType('source').Query();
16641664
Query
1665-
.variants('variant_entry_1', 'variant_entry_2')
1665+
.variants(['variant_entry_1', 'variant_entry_2'])
16661666
.toJSON()
16671667
.find()
16681668
.then(entries => {

test/typescript/entry-query.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,11 @@ describe('Entry Query Test', () => {
455455
done();
456456
});
457457

458+
test('Variants Query: Get variant Entries', done => {
459+
makeEntryQuery().variants(['variantEntryUid1', 'variantEntryUid2']).find().then((response) => done()).catch((error) => done());
460+
done();
461+
});
462+
458463
test('Taxonomy find test', done => {
459464
makeTaxonomyQuery().find().then((response) => done()).catch((error) => done());
460465
});
@@ -466,4 +471,4 @@ function makeEntryQuery() {
466471

467472
function makeTaxonomyQuery() {
468473
return stack.Taxonomies()
469-
}
474+
}

0 commit comments

Comments
 (0)