Download ponytail/tests/package.test.js from smlflg/CodingAgent: direct link, hf CLI and curl.
- Browser
- Download file 863 Bytes
-
https://huggingface.co/smlflg/CodingAgent/resolve/main/ponytail/tests/package.test.js
- Command line
-
hf download hf://smlflg/CodingAgent/ponytail/tests/package.test.js
-
curl -L -o package.test.js https://huggingface.co/smlflg/CodingAgent/resolve/main/ponytail/tests/package.test.js
863 Bytes
| // The README tells users to run `node scripts/uninstall.js`, so the npm package | |
| // must actually ship it. Guard the files entry so it can't silently drop out. | |
| const test = require('node:test'); | |
| const assert = require('node:assert/strict'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const root = path.join(__dirname, '..'); | |
| test('npm package ships the advertised cleanup script', () => { | |
| const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8')); | |
| assert.ok( | |
| pkg.files.includes('scripts/uninstall.js'), | |
| 'package.json "files" must include scripts/uninstall.js (README tells users to run it)', | |
| ); | |
| // And the file it points at must exist. | |
| assert.ok( | |
| fs.existsSync(path.join(root, 'scripts', 'uninstall.js')), | |
| 'scripts/uninstall.js is listed in files but missing on disk', | |
| ); | |
| }); | |