chore: add full object in output

pull/18058/head
paoloricciuti 4 months ago
parent a0d0f013da
commit 2dc8fd19a3

@ -5,6 +5,7 @@ import { compile_directory } from '../helpers.js';
import { suite_with_variants, type BaseTest } from '../suite.js';
import type { CompileOptions } from '#compiler';
import renderer, { create_root, serialize, dispatch_event } from './renderer.js';
import { writeFile } from 'node:fs/promises';
export interface CustomRendererTest extends BaseTest {
html?: string;
@ -122,6 +123,18 @@ async function run_test(cwd: string, config: CustomRendererTest, compile_options
throw err;
}
writeFile(
path.join(cwd, '_output/client/output.json'),
JSON.stringify(
target,
(key, value) => {
if (key === 'parent') return undefined;
return value;
},
'\t'
)
);
if (config.error) {
unintended_error = true;
assert.fail('Expected a runtime error');

Loading…
Cancel
Save