utquidem
Version:
The meta-framework suite designed from scratch for frontend-focused modern web development.
25 lines (21 loc) • 427 B
text/typescript
import helmet from '../src/serverRender/helmet';
const helmetData = {
bodyAttributes: '',
htmlAttributes: '',
base: '',
link: '',
meta: '',
noscript: '',
script: '',
style: '',
title: '',
};
describe('helmet', () => {
it('should replace title', () => {
const result = helmet('<title>foo</title>', {
...helmetData,
title: 'baz',
} as any);
expect(result).toMatch('baz');
});
});