_config.js — svelte Source File
Architecture documentation for _config.js, a javascript file in the svelte codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 51e6eb8d_d4b5_b663_8a09_9a7faf5b913d["_config.js"] 654af6d6_2570_6860_f8dd_6b6131e1eec4["test.ts"] 51e6eb8d_d4b5_b663_8a09_9a7faf5b913d --> 654af6d6_2570_6860_f8dd_6b6131e1eec4 e97e8c41_1b06_4e9a_29f3_64dbb37dee3c["helpers.js"] 51e6eb8d_d4b5_b663_8a09_9a7faf5b913d --> e97e8c41_1b06_4e9a_29f3_64dbb37dee3c 968bf0f0_2e69_28c9_a363_08177fdb8e17["create_deferred"] 51e6eb8d_d4b5_b663_8a09_9a7faf5b913d --> 968bf0f0_2e69_28c9_a363_08177fdb8e17 style 51e6eb8d_d4b5_b663_8a09_9a7faf5b913d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { test } from '../../test';
import { create_deferred } from '../../../helpers.js';
/** @type {ReturnType<typeof create_deferred>} */
let deferred;
export default test({
before_test() {
deferred = create_deferred();
},
get props() {
return { thePromise: deferred.promise };
},
html: `
<br>
<br>
<p>the promise is pending</p>
`,
expect_unhandled_rejections: true,
async test({ assert, component, target }) {
deferred.resolve();
await deferred.promise;
assert.htmlEqual(
target.innerHTML,
`
<p>the promise is resolved</p>
<br>
<p>the promise is resolved</p>
<br>
<p>the promise is resolved</p>
`
);
const local = (deferred = create_deferred());
component.thePromise = local.promise;
assert.htmlEqual(
target.innerHTML,
`
<br>
<br>
<p>the promise is pending</p>
`
);
local.reject(new Error('something broke'));
try {
await local.promise;
} catch {}
assert.htmlEqual(
target.innerHTML,
`<p>oh no! something broke</p>
<br />
<br />`
);
}
});
Domain
Subdomains
Dependencies
Source
Frequently Asked Questions
What does _config.js do?
_config.js is a source file in the svelte codebase, written in javascript. It belongs to the BuildSystem domain, MessageProcessor subdomain.
What functions are defined in _config.js?
_config.js defines 3 function(s): default.before_test, default.props, default.test.
What does _config.js depend on?
_config.js imports 3 module(s): create_deferred, helpers.js, test.ts.
Where is _config.js in the architecture?
_config.js is located at packages/svelte/tests/runtime-legacy/samples/await-then-no-expression/_config.js (domain: BuildSystem, subdomain: MessageProcessor, directory: packages/svelte/tests/runtime-legacy/samples/await-then-no-expression).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free