Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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')
})
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())
});
});
beforeAll(() => {
$output = mq(adminSubscriptionDetail, {
item: {
reward_id : 'reward_id'
},
key: 'subscription_id'
});
});
beforeAll(() => {
$output = mq(teamTotal);
});
let componentify = (component) => {
return mq(m({
controller () {
},
view () {
return component;
}
}));
};
beforeAll(() => {
$outputWithSubscriptionsSelected = mq(m(projectsExplore, { filter: 'sub' }));
$outputWithAonFlexSelected = mq(m(projectsExplore, { filter: 'not_sub' }));
});
beforeAll(() => {
$output = mq(m(copyTextInput, {value: testValue}));
});
beforeEach(() => {
$output = mq(youtubeLightbox, {src: 'FlFTcDSKnLM'});
});
$output = () => mq(projectSuccessfulOnboardConfirmAccount, {
projectAccount: {
owner_document: ''
},
addErrorReason: Function.prototype,
acceptAccount: Function.prototype,
acceptAccountLoader: Function.prototype
});
beforeEach(() => {
$output = mq(slider, {
slideComponent: HomeBannerSlide,
title,
slides
});
});