Download next.js/packages/next-codemod/transforms/__tests__/new-link.test.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 453 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next-codemod/transforms/__tests__/new-link.test.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next-codemod/transforms/__tests__/new-link.test.js
-
curl -L -o new-link.test.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next-codemod/transforms/__tests__/new-link.test.js
453 Bytes
| /* global jest */ | |
| jest.autoMockOff() | |
| const defineTest = require('jscodeshift/dist/testUtils').defineTest | |
| const fixtures = [ | |
| 'link-a', | |
| 'move-props', | |
| 'add-legacy-behavior', | |
| 'excludes-links-with-legacybehavior-prop', | |
| 'children-interpolation', | |
| 'spread-props', | |
| 'link-string', | |
| 'styled-jsx', | |
| 'handle-duplicate-props' | |
| ] | |
| for (const fixture of fixtures) { | |
| defineTest( | |
| __dirname, | |
| 'new-link', | |
| null, | |
| `new-link/${fixture}` | |
| ) | |
| } | |