Download reactjs_koans/test/06-RenderComponent.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/reactjs_koans/test/06-RenderComponent.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/reactjs_koans/test/06-RenderComponent.js
-
curl -L -o 06-RenderComponent.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/reactjs_koans/test/06-RenderComponent.js
565 Bytes
| import renderNameComponent from '../src/06-RenderComponent.js'; | |
| describe("06 - RenderComponent", () => { | |
| beforeEach( () => { | |
| renderNameComponent(document.body); | |
| }); | |
| describe("Task #1 - render Name component", () => { | |
| it('There should be a rendered React component', () => { | |
| var element = document.getElementById('hello'); | |
| assert.notEqual(element, null, "There should be a paragraph with id `hello` rendered on site."); | |
| assert.equal(element.innerHTML, "Bazinga!", "Rendered paragraph should contain `Bazinga!`"); | |
| }); | |
| }); | |
| }); | |