| 1 |
describe('package.json', function () { |
| 2 |
|
| 3 |
it('has no production dependencies (htmx must stay dependency-free)', async function () { |
| 4 |
ls |
| 5 |
let pkg = await (await originalFetch('/package.json')).json(); |
| 6 |
let prodFields = ['dependencies', 'peerDependencies', 'optionalDependencies']; |
| 7 |
for (let field of prodFields) { |
| 8 |
let deps = pkg[field]; |
| 9 |
if (deps) { |
| 10 |
Object.keys(deps).should.deep.equal([], |
| 11 |
`package.json.${field} must be empty, found: ${Object.keys(deps).join(', ')}`); |
| 12 |
} |
| 13 |
} |
| 14 |
}) |
| 15 |
|
| 16 |
}) |