Download spectrum/api/test/thread/queries/root.test.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 447 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/test/thread/queries/root.test.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/test/thread/queries/root.test.js
-
curl -L -o root.test.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/test/thread/queries/root.test.js
447 Bytes
| // @flow | |
| import { request } from '../../utils'; | |
| it('should fetch a thread', async () => { | |
| const query = /* GraphQL */ ` | |
| { | |
| thread(id: "thread-1") { | |
| id | |
| createdAt | |
| modifiedAt | |
| lastActive | |
| isPublished | |
| isLocked | |
| type | |
| content { | |
| title | |
| } | |
| } | |
| } | |
| `; | |
| expect.hasAssertions(); | |
| const result = await request(query); | |
| expect(result).toMatchSnapshot(); | |
| }); | |