How to use mithril-query - 10 common examples

To help you get started, we’ve selected a few mithril-query 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 catarse / catarse / catarse.js / legacy / spec / components / wrap.spec.tsx View on Github external
it('should not display component before user is loaded', async () => {
            // 1. arrange
            const userMocked = UserDetailMockery()[0]
            const user_id = userMocked.id
            jasmine.Ajax
                .stubRequest(`${apiPrefix}/user_details`)
                .andReturn({
                    responseText: `[{"id":${user_id},"name":"User Name"}]`,
                })

            const component = mq(Wrap(TestComponent, { user_id }))

            // 2. act

            // 3. assert
            component.should.not.contain('INNER COMPONENT CONTENT')
        })
github catarse / catarse.js / legacy / spec / components / project-about.spec.js View on Github external
beforeAll(() => {
            projectDetail = ProjectDetailsMockery()[0];
            rewardDetail = RewardDetailsMockery()[0];
            m.originalTrust = m.trust;
            $output = mq(projectAbout, {
                hasSubscription: prop(false),
                project: prop(projectDetail),
                rewardDetails: prop(RewardDetailsMockery()),
                goalDetails: prop(GoalsMockery())
            });
        });
github catarse / catarse.js / legacy / spec / components / admin-notification-details.spec.js View on Github external
beforeAll(() => {
        $output = mq(adminSubscriptionDetail, {
            item: {
                reward_id : 'reward_id'
            },
            key: 'subscription_id'
        });
    });
github catarse / catarse.js / legacy / spec / helpers / error.spec.js View on Github external
let componentify = (component) => {
        return mq(m({
            controller () {

            },
            view () {
                return component;
            }
        }));
    };
github catarse / catarse.js / legacy / spec / components / root / projects-explore.spec.js View on Github external
beforeAll(() => {
            $outputWithSubscriptionsSelected = mq(m(projectsExplore, { filter: 'sub' }));
            $outputWithAonFlexSelected = mq(m(projectsExplore, { filter: 'not_sub' }));
        });
github catarse / catarse.js / legacy / spec / components / copy-text-input.spec.js View on Github external
beforeAll(() => {
            $output = mq(m(copyTextInput, {value: testValue}));
        });
github catarse / catarse.js / legacy / spec / components / youtube-lightbox.spec.js View on Github external
beforeEach(() => {
            $output = mq(youtubeLightbox, {src: 'FlFTcDSKnLM'});
        });
github catarse / catarse.js / legacy / spec / components / project-successful-onboard-confirm-account.spec.js View on Github external
            $output = () => mq(projectSuccessfulOnboardConfirmAccount, {
                projectAccount: {
                    owner_document: ''
                },
                addErrorReason: Function.prototype,
                acceptAccount: Function.prototype,
                acceptAccountLoader: Function.prototype
            });
github catarse / catarse.js / legacy / spec / components / slider.spec.js View on Github external
beforeEach(() => {
            $output = mq(slider, {
                slideComponent: HomeBannerSlide,
                title,
                slides
            });
        });

mithril-query

Query mithril virtual dom for testing purposes

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular mithril-query functions