Skip to content

Commit

Permalink
Merge pull request #284 from aleksandr-kiliushin/main
Browse files Browse the repository at this point in the history
Fix function name in Solid Testing example
  • Loading branch information
edemaine committed Jan 29, 2024
2 parents 3194e56 + d1b7c6b commit 01115f1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion langs/en/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ You may want to keep parts of your state separate from the components for ease o
Also, since effects trigger asynchronously, it can help to wrap our assertions in a final effect. Alternatively, to observe a sequence of effects over multiple changes, it can help to return the necessary tools from `createRoot` and execute them in an async test function (as `createRoot` itself cannot take an `async` function).
As an example, let's test `createLocalStorage` from the [todo example](https://www.solidjs.com/examples/todos):
As an example, let's test `createLocalStore` from the [todo example](https://www.solidjs.com/examples/todos):
```ts
import { createEffect } from "solid-js";
Expand Down
2 changes: 1 addition & 1 deletion langs/es/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Es posible que desee mantener partes de su estado separadas de los componentes p
Además, dado que los efectos se activan asincrónicamente, puede ser útil envolver nuestras afirmaciones en un efecto final. Alternativamente, para observar una secuencia de efectos sobre múltiples cambios, puede ayudar retornar las herramientas necesarias desde `createRoot` y ejecutarlas en una función de prueba asíncrona (ya que `createRoot` en sí no puede tomar una función `asíncrona`).
Como ejemplo, probemos `createLocalStorage` del [ejemplo de tareas pendientes](https://www.solidjs.com/examples/todos):
Como ejemplo, probemos `createLocalStore` del [ejemplo de tareas pendientes](https://www.solidjs.com/examples/todos):
```ts
import { createEffect } from "solid-js";
Expand Down
2 changes: 1 addition & 1 deletion langs/ja/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ HTML 形式のカバレッジレポートが欲しい場合は、`c8` の代わ
また、Effect は非同期でトリガーされるので、最終的な Effect にアサーションをラップするのに役立ちます。また、複数の変更に対する一連の Effect を観察するには、`createRoot` から必要なツールを返して、非同期のテスト関数で実行すると便利です(`createRoot` 自体は `async` 関数を受け取ることができないので)。
例として、[ToDo のサンプル](https://www.solidjs.com/examples/todos)にある `createLocalStorage` をテストしてみましょう:
例として、[ToDo のサンプル](https://www.solidjs.com/examples/todos)にある `createLocalStore` をテストしてみましょう:
```ts
import { createEffect } from "solid-js";
Expand Down
2 changes: 1 addition & 1 deletion langs/ko-kr/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export default defineConfig({
또한, 이펙트는 비동기로 트리거되기 때문에, 최종 이펙트에서 어설션을 래핑하는 것이 도움이 됩니다.
또는, 여러 변경 사항에 걸친 일련의 이펙트를 관찰하려면, `createRoot`에서 필요한 도구를 반환하고, 비동기 테스트 함수에서 이를 실행하는 것이 도움이 될 수 있습니다. (이는 `createRoot` 자체는 비동기 함수를 받을 수 없기 때문입니다).
예를 들어, [todo 예제](https://www.solidjs.com/examples/todos)에서 `createLocalStorage` 를 테스트 하려면:
예를 들어, [todo 예제](https://www.solidjs.com/examples/todos)에서 `createLocalStore` 를 테스트 하려면:
```ts
import { createEffect } from "solid-js";
Expand Down
2 changes: 1 addition & 1 deletion langs/zh-cn/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ $ npm install # or pnpm install or yarn install
此外,由于 effect 是异步触发的,它可以帮助将我们的断言包装在最终 effect 中。或者,要观察多个更改的一系列 effect,它可以帮助从 `createRoot` 返回必要的工具并在异步测试函数中执行它们(因为`createRoot`本身不能接受`async`函数)。
作为示例,让我们测试 [todo 示例](https://www.solidjs.com/examples/todos) 中的 `createLocalStorage`
作为示例,让我们测试 [todo 示例](https://www.solidjs.com/examples/todos) 中的 `createLocalStore`
```ts
import { createEffect } from "solid-js";
Expand Down

0 comments on commit 01115f1

Please sign in to comment.