astro/scripts/memory/mk.js
Matthew Phillips 23783648b6
Adds memory leak test in CI (#2616)
* Add a memory leak test

* Add memory leak smoke test to CI

* Update the latest compiler

* Update yarn.lock

* Remove entries optimization

* Calculate as 5% higher
2022-02-18 14:23:47 -06:00

11 lines
264 B
JavaScript

import fs from 'fs';
const pages = new URL('./project/src/pages/', import.meta.url);
for(let i = 0; i < 100; i++) {
let content = `---
const i = ${i};
---
<span>{i}</span>`;
await fs.promises.writeFile(new URL(`./page-${i}.astro`, pages), content, 'utf-8');
}