import React from 'react';
import { Icon } from '../../dist/offline';
import { describe, test, expect } from 'vitest';
import { render } from '@testing-library/react';
const iconData = {
body: '',
width: 24,
height: 24,
};
describe('Inline attribute', () => {
test('boolean true', () => {
const renderResult = render();
expect(renderResult.container.innerHTML).toContain(
'style="vertical-align: -0.125em;"'
);
});
test('string', () => {
// @ts-expect-error
const renderResult = render();
expect(renderResult.container.innerHTML).toContain(
'style="vertical-align: -0.125em;"'
);
});
test('false', () => {
const renderResult = render();
expect(renderResult.container.innerHTML).not.toContain(
'vertical-align'
);
});
test('false string', () => {
// "false" should be ignored
// @ts-expect-error
const renderResult = render();
expect(renderResult.container.innerHTML).not.toContain(
'vertical-align'
);
});
});