mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
Fix failing test due to non-deterministic order of random names
This commit is contained in:
parent
3fc64a5f9f
commit
2082ffc260
@ -397,7 +397,7 @@ test.serial('Can get features tagged by tag', async t => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
test.serial('Can query for multiple tags using OR', async t => {
|
test.serial('Can query for multiple tags using OR', async t => {
|
||||||
t.plan(2);
|
t.plan(3);
|
||||||
const request = await setupApp(stores);
|
const request = await setupApp(stores);
|
||||||
const feature1Name = faker.helpers.slugify(faker.lorem.words(3));
|
const feature1Name = faker.helpers.slugify(faker.lorem.words(3));
|
||||||
const feature2Name = faker.helpers.slugify(faker.lorem.words(3));
|
const feature2Name = faker.helpers.slugify(faker.lorem.words(3));
|
||||||
@ -431,7 +431,8 @@ test.serial('Can query for multiple tags using OR', async t => {
|
|||||||
.expect(200)
|
.expect(200)
|
||||||
.expect(res => {
|
.expect(res => {
|
||||||
t.is(res.body.features.length, 2);
|
t.is(res.body.features.length, 2);
|
||||||
t.is(res.body.features[0].name, feature1Name);
|
t.true(res.body.features.some(f => f.name === feature1Name));
|
||||||
|
t.true(res.body.features.some(f => f.name === feature2Name));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
test.serial('Querying with multiple filters ANDs the filters', async t => {
|
test.serial('Querying with multiple filters ANDs the filters', async t => {
|
||||||
|
Loading…
Reference in New Issue
Block a user