.rejects Use .rejects to unwrap the reason of a rejected promise so any other matcher can be chained. If the promise is fulfilled the assertion fails. For example, this code te...
Await blocks Await blocks Most web applications have to deal with asynchronous data at some point. Svelte makes it easy to await the value of promises directly in your markup...
异步示例 .resolves async /await 错误处理 .rejects 异步示例 首先, 像 Getting Started 里面所说的那样, 启用babel的支持 Let’s implement a module that fetches user data from an API and returns the use...
异步示例 .resolves async /await 错误处理 .rejects 异步示例 首先, 像 Getting Started 里面所说的那样, 启用babel的支持 Let’s implement a module that fetches user data from an API and returns the use...