✨feature: First push to git
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { selectParser } from '../src/parsing/plugins.js';
|
||||
|
||||
describe('parser plugin selection', () => {
|
||||
it('selects Substack for Substack headers and generic otherwise', () => {
|
||||
expect(selectParser({ headers: { listId: 'thing.substack.com' }, html: '' }).name).toBe(
|
||||
'substack'
|
||||
);
|
||||
expect(
|
||||
selectParser({ headers: {}, html: '<a href="https://example.com">Example</a>' }).name
|
||||
).toBe('generic');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user