How to use the @inkline/inkline/src/helpers/query.querySelector function in @inkline/inkline

To help you get started, we’ve selected a few @inkline/inkline examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github inkline / inkline / tests / unit / helpers / query.spec.js View on Github external
it('should return item if $options.$extends.name matches given name', () => {
            expect(querySelector(items, '2')).toEqual(items[2]);
        });
github inkline / inkline / tests / unit / helpers / query.spec.js View on Github external
it('should return undefined if no items in array', () => {
            expect(querySelector([])).toEqual(undefined)
        });
github inkline / inkline / tests / unit / helpers / query.spec.js View on Github external
it('should return item if $children[0] matches given name', () => {
            expect(querySelector(items, '6')).toEqual(items[6].$children[0]);
        });
github inkline / inkline / tests / unit / helpers / query.spec.js View on Github external
it('should return undefined if item below given search depth', () => {
            expect(querySelector(items, '8', 2)).toEqual(undefined);
        });
github inkline / inkline / tests / unit / helpers / query.spec.js View on Github external
it('should return item if children[0] matches given name', () => {
            expect(querySelector(items, '5')).toEqual(items[5].children[0]);
        });
github inkline / inkline / tests / unit / helpers / query.spec.js View on Github external
it('should return item if item above given search depth', () => {
            expect(querySelector(items, '8', 3)).toEqual({ $options: { name: '8' } });
        });
    });
github inkline / inkline / tests / unit / helpers / query.spec.js View on Github external
it('should return item if $options.name matches given name', () => {
            expect(querySelector(items, '1')).toEqual(items[1]);
        });
github inkline / inkline / tests / unit / helpers / query.spec.js View on Github external
it('should return item if componentInstance.$options.$extends.name matches given name', () => {
            expect(querySelector(items, '4')).toEqual(items[4]);
        });
github inkline / inkline / tests / unit / helpers / query.spec.js View on Github external
it('should return item if componentInstance.$options.name matches given name', () => {
            expect(querySelector(items, '3')).toEqual(items[3]);
        });
github inkline / inkline / tests / unit / helpers / query.spec.js View on Github external
it('should return item if componentInstance.$children[0] matches given name', () => {
            expect(querySelector(items, '7')).toEqual(items[7].componentInstance.$children[0]);
        });