0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/test/e2e-cli/utils/expect.ts
Juan Picado 93468211d6
chore: update eslint dependencies (#2126)
* chore: update eslint

* chore: update rules and style

* chore: aling formatting

* chore: update ci rules

* chore: aling formatting

* chore: aling formatting
2021-03-14 08:42:46 +01:00

13 lines
336 B
TypeScript

import * as fs from 'fs-extra';
export function expectFileToExist(fileName: string) {
return new Promise((resolve, reject) => {
fs.exists(fileName, (exist) => {
if (exist) {
resolve(exist);
} else {
reject(new Error(`File ${fileName} was expected to exist but not found...`));
}
});
});
}