Download slate/packages/slate-hyperscript/test/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 464 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/slate/packages/slate-hyperscript/test/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/slate/packages/slate-hyperscript/test/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/slate/packages/slate-hyperscript/test/index.js
464 Bytes
| import assert from 'assert' | |
| import { resolve } from 'path' | |
| import { fixtures } from '../../../support/fixtures' | |
| describe('slate-hyperscript', () => { | |
| fixtures(resolve(__dirname, 'fixtures'), ({ module }) => { | |
| const { input, output } = module | |
| let actual = {} | |
| if (Array.isArray(output)) { | |
| actual = input | |
| } else { | |
| for (const key in output) { | |
| actual[key] = input[key] | |
| } | |
| } | |
| assert.deepEqual(actual, output) | |
| }) | |
| }) | |