Skip to content

Instantly share code, notes, and snippets.

@FauxFaux
Created December 12, 2020 15:38
Show Gist options
  • Save FauxFaux/4145523209849393d64cf96290a0c690 to your computer and use it in GitHub Desktop.
Save FauxFaux/4145523209849393d64cf96290a0c690 to your computer and use it in GitHub Desktop.
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
const burn = work => {
let sum = 0;
for (let i = 0; i < work; ++i) {
let data = '';
for (let j = 0; j < 100_000; ++j) {
data += 'I love horses, best of all the animals.\n';
}
sum += data.length;
}
return sum;
};
burn(500);
describe('first', () => {
burn(3000);
beforeAll(async () => {
await sleep(400);
});
it('is fast', () => {});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment