-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translate Test Renderer #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to adjust several common terms and italicize loanwords mas 😄
@@ -1,25 +1,26 @@ | |||
--- | |||
id: test-renderer | |||
title: Test Renderer | |||
title: Uji Renderer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Test Renderer is the name of the package itself, so it is fine to not translate it 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: Uji Renderer | |
title: Test Renderer |
permalink: docs/test-renderer.html | ||
layout: docs | ||
category: Reference | ||
--- | ||
|
||
**Importing** | ||
**Pengimporan** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import
in this context are translated as Cara Import
to make translation across pages uniform
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Pengimporan** | |
**Cara Import** |
|
||
Example: | ||
Pada dasarnya, *package* ini membuat kemudahan untuk mengambil potret awal dari hierarki tampilan *platform* (mirip dengan pohon DOM) yang di-*render* oleh React DOM atau komponen React Native tanpa menggunakan *browser* atau [jsdom](https://github.com/tmpvar/jsdom). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pada dasarnya, *package* ini membuat kemudahan untuk mengambil potret awal dari hierarki tampilan *platform* (mirip dengan pohon DOM) yang di-*render* oleh React DOM atau komponen React Native tanpa menggunakan *browser* atau [jsdom](https://github.com/tmpvar/jsdom). | |
Pada dasarnya, *package* ini memberi kemudahan untuk mengambil *snapshot* dari hierarki tampilan *platform* (mirip dengan pohon DOM) yang di-*render* oleh React DOM atau komponen React Native tanpa menggunakan *browser* atau [jsdom](https://github.com/tmpvar/jsdom). |
What do you think?
@@ -38,9 +39,9 @@ console.log(testRenderer.toJSON()); | |||
// children: [ 'Facebook' ] } | |||
``` | |||
|
|||
You can use Jest's snapshot testing feature to automatically save a copy of the JSON tree to a file and check in your tests that it hasn't changed: [Learn more about it](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html). | |||
Anda dapat menggunakan fitur pengujian potret awal dari Jest untuk menyimpan salinan pohon JSON ke *file* secara otomatis dan memeriksa bahwa pengujian Anda tidak berubah: [Pelajari lebih lanjut](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anda dapat menggunakan fitur pengujian potret awal dari Jest untuk menyimpan salinan pohon JSON ke *file* secara otomatis dan memeriksa bahwa pengujian Anda tidak berubah: [Pelajari lebih lanjut](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html). | |
Anda dapat menggunakan fitur *snapshot testing* dari Jest untuk menyimpan salinan pohon JSON ke *file* secara otomatis dan melakukan pengecekan di tes anda terhadap adanya perubahan (struktur): [Pelajari lebih lanjut](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html). |
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anda
-> Anda
Lihat: http://www.indonesia.co.jp/bataone/ruangbahasa39.html
|
||
You can also traverse the output to find specific nodes and make assertions about them. | ||
Anda juga dapat melewati ke bagian keluaran untuk menemukan *node* tertentu dan membuat pernyataan tentang *node - node* tersebut. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the context of traverse
in this context is better represented with melintasi
and assertions
is better represented with perbandingan terhadap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*node - node*
-> *node-node*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anda juga dapat melewati ke bagian keluaran untuk menemukan *node* tertentu dan membuat pernyataan tentang *node - node* tersebut. | |
Anda juga dapat melintasi ke bagian keluaran untuk menemukan *node* tertentu dan membuat perbandingan terhadap *node-node* tersebut. |
|
||
### `testInstance.children` {#testinstancechildren} | ||
|
||
```javascript | ||
testInstance.children | ||
``` | ||
|
||
The children test instances of this test instance. | ||
Anak uji *instance* dari uji *instance* ini. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anak uji *instance* dari uji *instance* ini. | |
*Test instance* anak dari *test instance* ini. |
You can pass `createNodeMock` function to `TestRenderer.create` as the option, which allows for custom mock refs. | ||
`createNodeMock` accepts the current element and should return a mock ref object. | ||
This is useful when you test a component that relies on refs. | ||
Anda dapat mengoper *function* `createNodeMock` ke ` TestRenderer.create` sebagai opsinya, yang memungkinkan untuk referensi tiruan yang sudah diubah. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anda dapat mengoper *function* `createNodeMock` ke ` TestRenderer.create` sebagai opsinya, yang memungkinkan untuk referensi tiruan yang sudah diubah. | |
Anda dapat mengoper fungsi `createNodeMock` ke ` TestRenderer.create` sebagai opsi, yang memungkinkan anda untuk membuat *mock refs* kustom. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anda
-> Anda
Lihat: http://www.indonesia.co.jp/bataone/ruangbahasa39.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anda dapat mengoper *function* `createNodeMock` ke ` TestRenderer.create` sebagai opsinya, yang memungkinkan untuk referensi tiruan yang sudah diubah. | |
Anda dapat mengoper fungsi `createNodeMock` ke `TestRenderer.create` sebagai opsi, yang memungkinkan Anda untuk membuat *mock refs* kustom. |
`createNodeMock` accepts the current element and should return a mock ref object. | ||
This is useful when you test a component that relies on refs. | ||
Anda dapat mengoper *function* `createNodeMock` ke ` TestRenderer.create` sebagai opsinya, yang memungkinkan untuk referensi tiruan yang sudah diubah. | ||
`createNodeMock` menerima elemen tersebut dan harus menghasilkan objek referensi tiruan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`createNodeMock` menerima elemen tersebut dan harus menghasilkan objek referensi tiruan. | |
`createNodeMock` menerima elemen saat ini dan harus menghasilkan sebuah objek *mock ref*. |
This is useful when you test a component that relies on refs. | ||
Anda dapat mengoper *function* `createNodeMock` ke ` TestRenderer.create` sebagai opsinya, yang memungkinkan untuk referensi tiruan yang sudah diubah. | ||
`createNodeMock` menerima elemen tersebut dan harus menghasilkan objek referensi tiruan. | ||
Hal Ini berguna ketika Anda menguji sebuah komponen yang bergantung pada referensi. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hal Ini berguna ketika Anda menguji sebuah komponen yang bergantung pada referensi. | |
Hal Ini berguna ketika Anda menguji sebuah komponen yang bergantung pada *refs*. |
@@ -268,7 +269,7 @@ TestRenderer.create( | |||
{ | |||
createNodeMock: (element) => { | |||
if (element.type === 'input') { | |||
// mock a focus function | |||
// tiruan function focus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiruan dari fungsi focus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// tiruan function focus | |
// tiruan dari fungsi focus |
|
||
You can also traverse the output to find specific nodes and make assertions about them. | ||
Anda juga dapat melewati ke bagian keluaran untuk menemukan *node* tertentu dan membuat pernyataan tentang *node - node* tersebut. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*node - node*
-> *node-node*
@@ -38,9 +39,9 @@ console.log(testRenderer.toJSON()); | |||
// children: [ 'Facebook' ] } | |||
``` | |||
|
|||
You can use Jest's snapshot testing feature to automatically save a copy of the JSON tree to a file and check in your tests that it hasn't changed: [Learn more about it](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html). | |||
Anda dapat menggunakan fitur pengujian potret awal dari Jest untuk menyimpan salinan pohon JSON ke *file* secara otomatis dan memeriksa bahwa pengujian Anda tidak berubah: [Pelajari lebih lanjut](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anda
-> Anda
Lihat: http://www.indonesia.co.jp/bataone/ruangbahasa39.html
You can pass `createNodeMock` function to `TestRenderer.create` as the option, which allows for custom mock refs. | ||
`createNodeMock` accepts the current element and should return a mock ref object. | ||
This is useful when you test a component that relies on refs. | ||
Anda dapat mengoper *function* `createNodeMock` ke ` TestRenderer.create` sebagai opsinya, yang memungkinkan untuk referensi tiruan yang sudah diubah. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anda
-> Anda
Lihat: http://www.indonesia.co.jp/bataone/ruangbahasa39.html
thanks mas @regalius and mas @arfianadam for the correction, will fix. |
Hi @rianonehub , any update regarding this PR? 😄 Also noticed there's conflict with upstream, please kindly resolve them |
@rianonehub hi, is there any update on this ? |
Deploy preview for idreactjs ready! Built with commit 10febf3 |
Deploy preview for id-reactjs ready! Built with commit 10febf3 |
|
||
### `testInstance.findAll()` {#testinstancefindall} | ||
|
||
```javascript | ||
testInstance.findAll(test) | ||
``` | ||
|
||
Find all descendant test instances for which `test(testInstance)` returns `true`. | ||
Menemukan semua turunan uji *instance* yang mana `test(testInstance)` menghasilkan nilai `true`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Menemukan semua turunan uji *instance* yang mana `test(testInstance)` menghasilkan nilai `true`. | |
Menemukan semua turunan uji *instance* dimana `test(testInstance)` menghasilkan nilai `true`. |
You can pass `createNodeMock` function to `TestRenderer.create` as the option, which allows for custom mock refs. | ||
`createNodeMock` accepts the current element and should return a mock ref object. | ||
This is useful when you test a component that relies on refs. | ||
Anda dapat mengoper *function* `createNodeMock` ke ` TestRenderer.create` sebagai opsinya, yang memungkinkan untuk referensi tiruan yang sudah diubah. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anda dapat mengoper *function* `createNodeMock` ke ` TestRenderer.create` sebagai opsinya, yang memungkinkan untuk referensi tiruan yang sudah diubah. | |
Anda dapat mengoper fungsi `createNodeMock` ke `TestRenderer.create` sebagai opsi, yang memungkinkan Anda untuk membuat *mock refs* kustom. |
@@ -268,7 +269,7 @@ TestRenderer.create( | |||
{ | |||
createNodeMock: (element) => { | |||
if (element.type === 'input') { | |||
// mock a focus function | |||
// tiruan function focus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// tiruan function focus | |
// tiruan dari fungsi focus |
Hi guys,
this is "Test Renderer" page translation, please review 😁