import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import ArticlePreview from '../ArticlePreview';

describe('ArticlePreview', () => {
    it('should render ArticlePreview component properly', () => {
        const wrapper = shallow(<ArticlePreview description="Article Description" title="Article title" />);
        expect(wrapper.render().text).to.contain('Article title');
    });
});

import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import ArticlePreview from '../ArticlePreview';

describe('ArticlePreview', () => {
    it('should render ArticlePreview component properly', () => {
        const wrapper = shallow(<ArticlePreview description="Article Description" title="Article title" />);
        expect(wrapper.render().text()).to.contain('Article title');
    });
});

Fix a bug, used .test instead of .test()
Fix a bug, used .test instead of .test()
