/**
* Tests for session.ts.
*/
// deno-lint-ignore-file no-import-prefix no-unversioned-import
import { describe, it } from 'jsr:@std/testing/bdd';
import { expect } from 'jsr:@std/expect';
import * as fc from 'npm:fast-check';
import {
odd_character_wikitext_string,
pathological_wikitext_string,
spacing_heavy_wikitext_string,
wikiish_string,
} from './_test_utils/arbitraries.ts';
import {
BARE_URI_ACCEPTANCE_FIXTURES,
BARE_URI_REJECTION_FIXTURES,
EXPLICIT_URI_ACCEPTANCE_FIXTURES,
} from './_test_utils/uri_fixtures.ts';
import { UNICODE_TEXT_FIXTURES } from './_test_utils/unicode_fixtures.ts';
import { DiagnosticCode } from './events.ts';
import { createSession } from './session.ts';
import {
analyze,
events,
materialize,
outlineEvents,
parse,
parseStrictWithDiagnostics,
parseWithDiagnostics,
parseWithRecovery,
} from './parse.ts';
import { TreeMaterializationPolicy } from './tree_builder.ts';
import type { TextSource } from './text_source.ts';
const SESSION_FIXTURES = [
[
'== Lead ==',
`A [[Main Page|home]] link with ''italic'' and '''bold'''.`,
'',
'* Bullet one',
'* Bullet two with {{Card|title=Plan|body=value}}',
'',
'{|',
'! Planet !! Notes',
'|-',
'| Mars || [Known as the red planet]',
'|}',
].join('\n'),
[
'Paragraph with [[literal]] text and & entity.',
'Second line keeps the paragraph open until a blank line.',
'',
'; Term',
': Description with [https://example.com label]',
].join('\n'),
[
'[[[[{{{{