Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Sep 10, 2021
1 parent 9ef0494 commit bcb26e2
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ describe('index_patterns/field_capabilities/field_capabilities', () => {
});

describe('response order', () => {
it('supports fields that start with an underscore', async () => {
const fields = ['_field_a', '_field_b'];

stubDeps({
fieldsFromFieldCaps: fields.map((name) => ({ name })),
});

const fieldNames = (await getFieldCapabilities()).map((field) => field.name);
expect(fieldNames).toEqual(fields);
});

it('always returns fields in alphabetical order', async () => {
const letters = 'ambcdfjopngihkel'.split('');
const sortedLetters = sortBy(letters);
Expand Down

0 comments on commit bcb26e2

Please sign in to comment.